diff --git a/Plugin Cubot/Plugin Cubot.iml b/Plugin Cubot/Plugin Cubot.iml deleted file mode 100644 index a6ee292..0000000 --- a/Plugin Cubot/Plugin Cubot.iml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotLaser.java b/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotLaser.java index 7e8587a..d71fa4a 100644 --- a/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotLaser.java +++ b/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotLaser.java @@ -4,10 +4,7 @@ import net.simon987.server.GameServer; import net.simon987.server.assembly.HardwareModule; import net.simon987.server.assembly.Status; import net.simon987.server.game.item.Item; -import net.simon987.server.game.objects.Action; -import net.simon987.server.game.objects.Attackable; -import net.simon987.server.game.objects.GameObject; -import net.simon987.server.game.objects.InventoryHolder; +import net.simon987.server.game.objects.*; import org.bson.Document; import java.awt.*; @@ -32,7 +29,7 @@ public class CubotLaser extends HardwareModule { super(null, unit); } - public CubotLaser(Document document, Cubot cubot) { + public CubotLaser(Document document, ControllableUnit cubot) { super(document, cubot); } diff --git a/Plugin Misc HW/Plugin Misc HW.iml b/Plugin Misc HW/Plugin Misc HW.iml deleted file mode 100644 index b129737..0000000 --- a/Plugin Misc HW/Plugin Misc HW.iml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Plugin NPC/Plugin NPC.iml b/Plugin NPC/Plugin NPC.iml deleted file mode 100644 index 63bda44..0000000 --- a/Plugin NPC/Plugin NPC.iml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Plugin Plant/Plugin Plant.iml b/Plugin Plant/Plugin Plant.iml deleted file mode 100644 index 63bda44..0000000 --- a/Plugin Plant/Plugin Plant.iml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Plugin Plant/src/main/java/net/simon987/biomassplugin/BiomassBlob.java b/Plugin Plant/src/main/java/net/simon987/biomassplugin/BiomassBlob.java index 59ff076..535468c 100644 --- a/Plugin Plant/src/main/java/net/simon987/biomassplugin/BiomassBlob.java +++ b/Plugin Plant/src/main/java/net/simon987/biomassplugin/BiomassBlob.java @@ -69,6 +69,11 @@ public class BiomassBlob extends GameObject implements InventoryHolder { return false; } + @Override + public boolean canPlaceItem(int itemId) { + return false; + } + @Override public boolean canTakeItem(int itemId) { return itemId == ItemBiomass.ID && biomassCount >= 1; diff --git a/Server/src/main/java/net/simon987/server/game/objects/GameRegistry.java b/Server/src/main/java/net/simon987/server/game/objects/GameRegistry.java index add111d..17e1840 100644 --- a/Server/src/main/java/net/simon987/server/game/objects/GameRegistry.java +++ b/Server/src/main/java/net/simon987/server/game/objects/GameRegistry.java @@ -46,6 +46,9 @@ public class GameRegistry { if (hardware.containsKey(type)) { try { + System.out.println(type); + System.out.println(hardware.get(type)); + return hardware.get(type).getConstructor(Document.class, ControllableUnit.class).newInstance(document, controllableUnit); } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { diff --git a/Server/src/main/resources/config.properties b/Server/src/main/resources/config.properties index 7f85c34..49a4cf7 100644 --- a/Server/src/main/resources/config.properties +++ b/Server/src/main/resources/config.properties @@ -12,7 +12,7 @@ server_name=MAR dev # ALLOW | BLOCK guest_policy=ALLOW # DEBUG -#autologin=simon +autologin=simon #Database mongo_dbname=mar_beta diff --git a/plugin-contruction/src/main/java/net/simon987/constructionplugin/ConstructionArmHardware.java b/plugin-contruction/src/main/java/net/simon987/constructionplugin/ConstructionArmHardware.java index e97e4cc..0ca6e11 100644 --- a/plugin-contruction/src/main/java/net/simon987/constructionplugin/ConstructionArmHardware.java +++ b/plugin-contruction/src/main/java/net/simon987/constructionplugin/ConstructionArmHardware.java @@ -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); } }