@@ -755,6 +755,7 @@ error.title = [scarlet]An error has occured
|
|||||||
error.crashtitle = An error has occured
|
error.crashtitle = An error has occured
|
||||||
unit.nobuild = [scarlet]Unit can't build
|
unit.nobuild = [scarlet]Unit can't build
|
||||||
lastaccessed = [lightgray]Last Accessed: {0}
|
lastaccessed = [lightgray]Last Accessed: {0}
|
||||||
|
lastcommanded = [lightgray]Last Commanded: {0}
|
||||||
block.unknown = [lightgray]???
|
block.unknown = [lightgray]???
|
||||||
|
|
||||||
stat.showinmap = <load map to show>
|
stat.showinmap = <load map to show>
|
||||||
|
|||||||
@@ -1250,7 +1250,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
if(value instanceof UnitType) type = UnitType.class;
|
if(value instanceof UnitType) type = UnitType.class;
|
||||||
|
|
||||||
if(builder != null && builder.isPlayer()){
|
if(builder != null && builder.isPlayer()){
|
||||||
lastAccessed = builder.getPlayer().name;
|
lastAccessed = builder.getPlayer().coloredName();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(block.configurations.containsKey(type)){
|
if(block.configurations.containsKey(type)){
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
//TODO could be better represented as a unit
|
//TODO could be better represented as a unit
|
||||||
transient @Nullable UnitType dockedType;
|
transient @Nullable UnitType dockedType;
|
||||||
|
|
||||||
|
transient String lastCommanded;
|
||||||
transient float shadowAlpha = -1f, healTime;
|
transient float shadowAlpha = -1f, healTime;
|
||||||
transient int lastFogPos;
|
transient int lastFogPos;
|
||||||
private transient float resupplyTime = Mathf.random(10f);
|
private transient float resupplyTime = Mathf.random(10f);
|
||||||
|
|||||||
@@ -234,6 +234,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
ai.commandPosition(posTarget);
|
ai.commandPosition(posTarget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unit.lastCommanded = player.coloredName();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unitIds.length > 0 && player == Vars.player){
|
if(unitIds.length > 0 && player == Vars.player){
|
||||||
|
|||||||
@@ -510,13 +510,24 @@ public class UnitType extends UnlockableContent{
|
|||||||
}
|
}
|
||||||
}).growX();
|
}).growX();
|
||||||
|
|
||||||
if(unit.controller() instanceof LogicAI){
|
if(unit.controller() instanceof LogicAI ai){
|
||||||
table.row();
|
table.row();
|
||||||
table.add(Blocks.microProcessor.emoji() + " " + Core.bundle.get("units.processorcontrol")).growX().wrap().left();
|
table.add(Blocks.microProcessor.emoji() + " " + Core.bundle.get("units.processorcontrol")).growX().wrap().left();
|
||||||
|
if(ai.controller != null && (Core.settings.getBool("mouseposition") || Core.settings.getBool("position"))){
|
||||||
|
table.row();
|
||||||
|
table.add("[lightgray](" + ai.controller.tileX() + ", " + ai.controller.tileY() + ")").growX().wrap().left();
|
||||||
|
}
|
||||||
table.row();
|
table.row();
|
||||||
table.label(() -> Iconc.settings + " " + (long)unit.flag + "").color(Color.lightGray).growX().wrap().left();
|
table.label(() -> Iconc.settings + " " + (long)unit.flag + "").color(Color.lightGray).growX().wrap().left();
|
||||||
|
if(net.active() && ai.controller != null && ai.controller.lastAccessed != null){
|
||||||
|
table.row();
|
||||||
|
table.add(Core.bundle.format("lastaccessed", ai.controller.lastAccessed)).growX().wrap().left();
|
||||||
|
}
|
||||||
|
}else if(net.active() && unit.lastCommanded != null){
|
||||||
|
table.row();
|
||||||
|
table.add(Core.bundle.format("lastcommanded", unit.lastCommanded)).growX().wrap().left();
|
||||||
}
|
}
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user