blueprint wip

This commit is contained in:
2019-07-02 09:28:00 -04:00
parent 6a8d2bd0d6
commit a189fbfc90
9 changed files with 13 additions and 360 deletions

View File

@@ -16,6 +16,7 @@ public class ConstructionArmHardware extends HardwareModule {
public static final int DEFAULT_ADDRESS = 0x0010;
private static final int OK = 0;
private static final int ERR_TILE_BLOCKED = 1;
private static final int ERR_NOT_ENOUGH_ENERGY = 2;
private static final int ERR_MEM_READ = 3;
@@ -41,8 +42,6 @@ public class ConstructionArmHardware extends HardwareModule {
Register regB = getCpu().getRegisterSet().getRegister("B");
if (a == PLACE_CONSTRUCTION_SITE) {
System.out.println("DEBUG PLACE CONTRUCTION SITE");
char[] bluePrintData = getCpu().getMemory().read(x, BluePrint.DATA_LENGTH);
if (bluePrintData == null) {
@@ -74,9 +73,7 @@ public class ConstructionArmHardware extends HardwareModule {
constructionSite.setObjectId(new ObjectId());
unit.getWorld().addObject(constructionSite);
regB.setValue(0);
System.out.println("OK");
regB.setValue(OK);
}
}