mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-03 13:30:25 +07:00
How
This commit is contained in:
parent
4a7231fb5a
commit
6566bf9dd5
@ -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
|
||||
|
Binary file not shown.
@ -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
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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<UnlockableContent, BulletType> ammoTypes = new ObjectMap<>();
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user