This commit is contained in:
simon987
2019-01-15 21:02:25 -05:00
parent 993838651f
commit 762bad758b
23 changed files with 212 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
package net.simon987.cubotplugin;
import net.simon987.server.GameServer;
import net.simon987.server.ServerConfiguration;
import net.simon987.server.IServerConfiguration;
import net.simon987.server.assembly.CPU;
import net.simon987.server.assembly.HardwareModule;
import net.simon987.server.assembly.Memory;
@@ -128,7 +128,7 @@ public class Cubot extends GameObject implements Updatable, ControllableUnit, Me
shield = document.getInteger("shield");
setDirection(Direction.getDirection(document.getInteger("direction")));
ServerConfiguration config = GameServer.INSTANCE.getConfig();
IServerConfiguration config = GameServer.INSTANCE.getConfig();
maxHp = config.getInt("cubot_max_hp");
maxShield = config.getInt("cubot_max_shield");
@@ -278,7 +278,7 @@ public class Cubot extends GameObject implements Updatable, ControllableUnit, Me
this.getWorld().removeObject(this);
this.getWorld().decUpdatable();
ServerConfiguration config = GameServer.INSTANCE.getConfig();
IServerConfiguration config = GameServer.INSTANCE.getConfig();
Random random = new Random();
int spawnX = config.getInt("new_user_worldX") + random.nextInt(5);

View File

@@ -3,7 +3,7 @@ package net.simon987.cubotplugin.event;
import net.simon987.cubotplugin.Cubot;
import net.simon987.cubotplugin.CubotStatus;
import net.simon987.server.GameServer;
import net.simon987.server.ServerConfiguration;
import net.simon987.server.IServerConfiguration;
import net.simon987.server.assembly.Assembler;
import net.simon987.server.assembly.AssemblyResult;
import net.simon987.server.assembly.CPU;
@@ -33,7 +33,7 @@ public class UserCreationListener implements GameEventListener {
Cubot cubot = new Cubot();
cubot.addStatus(CubotStatus.FACTORY_NEW);
cubot.setObjectId(new ObjectId());
ServerConfiguration config = GameServer.INSTANCE.getConfig();
IServerConfiguration config = GameServer.INSTANCE.getConfig();
Point point = null;
while (point == null || cubot.getWorld() == null) {