mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 02:36:41 +00:00
Should fix user creation problem
This commit is contained in:
parent
e7e9a3e6fb
commit
e69111ff3c
@ -6,6 +6,7 @@ import net.simon987.server.assembly.CPU;
|
|||||||
import net.simon987.server.event.CpuInitialisationEvent;
|
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.HardwareHost;
|
||||||
|
|
||||||
public class CpuInitialisationListener implements GameEventListener {
|
public class CpuInitialisationListener implements GameEventListener {
|
||||||
|
|
||||||
@ -18,6 +19,8 @@ public class CpuInitialisationListener implements GameEventListener {
|
|||||||
public void handle(GameEvent event) {
|
public void handle(GameEvent event) {
|
||||||
|
|
||||||
CPU cpu = (CPU) event.getSource();
|
CPU cpu = (CPU) event.getSource();
|
||||||
|
HardwareHost cubot = (HardwareHost) ((CpuInitialisationEvent) event).getUnit();
|
||||||
|
cpu.setHardwareHost(cubot);
|
||||||
|
|
||||||
RandomNumberGenerator rngHW = new RandomNumberGenerator();
|
RandomNumberGenerator rngHW = new RandomNumberGenerator();
|
||||||
rngHW.setCpu(cpu);
|
rngHW.setCpu(cpu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user