mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-20 02:56:44 +00:00
Should fix user creation problem
This commit is contained in:
parent
a1cf279b6f
commit
64193ecf7a
@ -6,6 +6,7 @@ import net.simon987.server.event.CpuInitialisationEvent;
|
|||||||
import net.simon987.server.event.GameEvent;
|
import net.simon987.server.event.GameEvent;
|
||||||
import net.simon987.server.event.GameEventListener;
|
import net.simon987.server.event.GameEventListener;
|
||||||
import net.simon987.server.game.objects.ControllableUnit;
|
import net.simon987.server.game.objects.ControllableUnit;
|
||||||
|
import net.simon987.server.game.objects.HardwareHost;
|
||||||
|
|
||||||
public class CpuInitialisationListener implements GameEventListener {
|
public class CpuInitialisationListener implements GameEventListener {
|
||||||
@Override
|
@Override
|
||||||
@ -17,8 +18,8 @@ public class CpuInitialisationListener implements GameEventListener {
|
|||||||
@Override
|
@Override
|
||||||
public void handle(GameEvent event) {
|
public void handle(GameEvent event) {
|
||||||
CPU cpu = (CPU) event.getSource();
|
CPU cpu = (CPU) event.getSource();
|
||||||
|
|
||||||
ControllableUnit controllableUnit = ((CpuInitialisationEvent) event).getUnit();
|
ControllableUnit controllableUnit = ((CpuInitialisationEvent) event).getUnit();
|
||||||
|
cpu.setHardwareHost((HardwareHost) controllableUnit);
|
||||||
|
|
||||||
RadioReceiverHardware radioHw = new RadioReceiverHardware(controllableUnit);
|
RadioReceiverHardware radioHw = new RadioReceiverHardware(controllableUnit);
|
||||||
radioHw.setCpu(cpu);
|
radioHw.setCpu(cpu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user