mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-12-13 14:49:03 +00:00
I broke everything pt. 1: Moved helditem into CubotInventory, added debug commands for CubotInventory, Added vault complete GameEvent, moved CPU to Cubot, renamed CpuHardware to HardwareModule, moved HardwareModule to Cubot & added HardwareHost interface, removed getParent() in ControllableUnit, moved items to the Item class, started moving tiles to Tile classes, renamed Programmable to MessageReceiver
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package net.simon987.mischwplugin;
|
||||
|
||||
import net.simon987.server.GameServer;
|
||||
import net.simon987.server.assembly.CpuHardware;
|
||||
import net.simon987.server.assembly.HardwareModule;
|
||||
import net.simon987.server.assembly.Status;
|
||||
import net.simon987.server.assembly.Util;
|
||||
import net.simon987.server.game.objects.ControllableUnit;
|
||||
@@ -10,7 +10,7 @@ import org.bson.Document;
|
||||
/**
|
||||
* Hardware to get game time
|
||||
*/
|
||||
public class Clock extends CpuHardware {
|
||||
public class Clock extends HardwareModule {
|
||||
|
||||
private static final char HWID = 0x0008;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.simon987.mischwplugin;
|
||||
|
||||
import net.simon987.server.assembly.CpuHardware;
|
||||
import net.simon987.server.assembly.HardwareModule;
|
||||
import net.simon987.server.assembly.Status;
|
||||
import net.simon987.server.game.objects.ControllableUnit;
|
||||
import org.bson.Document;
|
||||
@@ -10,7 +10,7 @@ import java.util.Random;
|
||||
/**
|
||||
* Hardware to generate random numbers
|
||||
*/
|
||||
public class RandomNumberGenerator extends CpuHardware {
|
||||
public class RandomNumberGenerator extends HardwareModule {
|
||||
|
||||
private static final char HWID = 0x0007;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class CpuInitialisationListener implements GameEventListener {
|
||||
Clock clock = new Clock();
|
||||
clock.setCpu(cpu);
|
||||
|
||||
cpu.attachHardware(rngHW, RandomNumberGenerator.DEFAULT_ADDRESS);
|
||||
cpu.attachHardware(clock, Clock.DEFAULT_ADDRESS);
|
||||
cubot.attachHardware(rngHW, RandomNumberGenerator.DEFAULT_ADDRESS);
|
||||
cubot.attachHardware(clock, Clock.DEFAULT_ADDRESS);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user