Removed Mech/UnitType

This commit is contained in:
Anuken
2020-01-10 15:08:13 -05:00
parent f7791a2bb2
commit b123b8b074
14 changed files with 237 additions and 310 deletions

View File

@@ -232,13 +232,13 @@ public class TypeIO{
return Effects.getEffect(buffer.getShort());
}
@WriteClass(UnitType.class)
public static void writeUnitType(ByteBuffer buffer, UnitType effect){
@WriteClass(UnitDef.class)
public static void writeUnitType(ByteBuffer buffer, UnitDef effect){
buffer.putShort(effect.id);
}
@ReadClass(UnitType.class)
public static UnitType readUnitType(ByteBuffer buffer){
@ReadClass(UnitDef.class)
public static UnitDef readUnitType(ByteBuffer buffer){
return content.getByID(ContentType.unit, buffer.getShort());
}
@@ -252,16 +252,6 @@ public class TypeIO{
return new Color(buffer.getInt());
}
@WriteClass(Mech.class)
public static void writeMech(ByteBuffer buffer, Mech mech){
buffer.put((byte)mech.id);
}
@ReadClass(Mech.class)
public static Mech readMech(ByteBuffer buffer){
return content.getByID(ContentType.mech, buffer.get());
}
@WriteClass(Liquid.class)
public static void writeLiquid(ByteBuffer buffer, Liquid liquid){
buffer.putShort(liquid == null ? -1 : liquid.id);