diff --git a/annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java b/annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java index 4dafe96239..2b2227e73e 100644 --- a/annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java +++ b/annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java @@ -381,12 +381,14 @@ public class EntityProcess extends BaseProcessor{ syncedFields.sortComparing(Selement::name); - //override toString method - builder.addMethod(MethodSpec.methodBuilder("toString") + if(!methods.containsKey("toString()")){ + //override toString method + builder.addMethod(MethodSpec.methodBuilder("toString") .addAnnotation(Override.class) .returns(String.class) .addModifiers(Modifier.PUBLIC) .addStatement("return $S + $L", name + "#", "id").build()); + } EntityIO io = new EntityIO(type.name(), builder, allFieldSpecs, serializer, rootDirectory.child("annotations/src/main/resources/revisions").child(type.name())); //entities with no sync comp and no serialization gen no code diff --git a/core/assets/maps/karst.msav b/core/assets/maps/karst.msav index 1157b5591a..f04b1216cb 100644 Binary files a/core/assets/maps/karst.msav and b/core/assets/maps/karst.msav differ diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index cc5af14398..e85d9b30a8 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -2016,5 +2016,11 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, out.setCentered(x, y, block.size * tilesize, block.size * tilesize); } + @Override + @Replace + public String toString(){ + return "Building#" + id() + "[" + tileX() + "," + tileY() + "]:" + block; + } + //endregion } diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index b5eee36365..b533e62e02 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -688,4 +688,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I //deaths are synced; this calls killed() Call.unitDeath(id); } + + @Override + @Replace + public String toString(){ + return "Unit#" + id() + ":" + type; + } } diff --git a/core/src/mindustry/world/blocks/defense/turrets/PayloadAmmoTurret.java b/core/src/mindustry/world/blocks/defense/turrets/PayloadAmmoTurret.java index 93308b8b0e..cb786b2c0b 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/PayloadAmmoTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/PayloadAmmoTurret.java @@ -17,6 +17,7 @@ import mindustry.world.meta.*; import static mindustry.Vars.*; //TODO visuals! +/** Do not use this class! */ public class PayloadAmmoTurret extends Turret{ public ObjectMap ammoTypes = new ObjectMap<>(); diff --git a/gradle.properties b/gradle.properties index 443cbf281e..ccf6105d7c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=5a1cbb8b59 +archash=2b9b7c4a1d