Added sectors to tech tree / Bugfixes

This commit is contained in:
Anuken
2020-07-30 23:13:06 -04:00
parent ff990925f0
commit a4ddf90ef5
8 changed files with 113 additions and 93 deletions

View File

@@ -74,6 +74,9 @@ public class TypeIO{
write.b(9);
write.b((byte)map.content.getContentType().ordinal());
write.s(map.content.id);
}else if(object instanceof Boolean){
write.b((byte)10);
write.bool((Boolean)object);
}else{
throw new IllegalArgumentException("Unknown object type: " + object.getClass());
}
@@ -92,6 +95,7 @@ public class TypeIO{
case 7: return new Point2(read.i(), read.i());
case 8: byte len = read.b(); Point2[] out = new Point2[len]; for(int i = 0; i < len; i ++) out[i] = Point2.unpack(read.i()); return out;
case 9: return TechTree.getNotNull(content.getByID(ContentType.all[read.b()], read.s()));
case 10: return read.bool();
default: throw new IllegalArgumentException("Unknown object type: " + type);
}
}