Added serialization code for CubotRepair

This commit is contained in:
Dylan Sheehy 2018-01-01 19:54:52 -06:00
parent eef0ddf99b
commit 87feb6a280
2 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,8 @@ public class CubotPlugin extends ServerPlugin implements GameObjectDeserializer,
return CubotFloppyDrive.deserialize(hwJson); return CubotFloppyDrive.deserialize(hwJson);
case CubotComPort.HWID: case CubotComPort.HWID:
return CubotComPort.deserialize(hwJson); return CubotComPort.deserialize(hwJson);
case CubotRepair.HWID:
return CubotRepair.deserialize(hwJson);
} }
return null; return null;

View File

@ -61,4 +61,7 @@ public class CubotRepair extends CpuHardware {
return HWID; return HWID;
} }
public static CubotRepair deserialize(JSONObject json) {
return new CubotRepair((Cubot) GameServer.INSTANCE.getGameUniverse().getObject((int) (long) json.get("cubot")));
}
} }