Re-added command center

This commit is contained in:
Anuken
2020-08-24 19:49:49 -04:00
parent 6b7debbba7
commit b207d05d4b
21 changed files with 5747 additions and 5541 deletions

View File

@@ -34,7 +34,6 @@ public abstract class SaveFileReader{
"titan-factory", "legacy-unit-factory",
"fortress-factory", "legacy-unit-factory",
"command-center", "legacy-command-center",
"mass-conveyor", "payload-conveyor"
);

View File

@@ -92,6 +92,9 @@ public class TypeIO{
write.b((byte)14);
write.i(((byte[])object).length);
write.b((byte[])object);
}else if(object instanceof UnitCommand){
write.b((byte)15);
write.b(((UnitCommand)object).ordinal());
}else{
throw new IllegalArgumentException("Unknown object type: " + object.getClass());
}
@@ -116,6 +119,7 @@ public class TypeIO{
case 12: return world.build(read.i());
case 13: return LAccess.all[read.s()];
case 14: int blen = read.i(); byte[] bytes = new byte[blen]; read.b(bytes); return bytes;
case 15: return UnitCommand.all[read.b()];
default: throw new IllegalArgumentException("Unknown object type: " + type);
}
}