Show controlled units on processor hover
This commit is contained in:
@@ -8,6 +8,7 @@ import arc.struct.*;
|
|||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.io.*;
|
import arc.util.io.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
|
import mindustry.ai.types.*;
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
@@ -431,6 +432,13 @@ public class LogicBlock extends Block{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawSelect() {
|
||||||
|
Groups.unit.each(u -> u.controller() instanceof LogicAI ai && ai.controller == this, unit -> {
|
||||||
|
Drawf.square(unit.x, unit.y, unit.hitSize, unit.rotation + 45);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public boolean validLink(Building other){
|
public boolean validLink(Building other){
|
||||||
return other != null && other.isValid() && other.team == team && other.within(this, range + other.block.size*tilesize/2f) && !(other instanceof ConstructBuild);
|
return other != null && other.isValid() && other.team == team && other.within(this, range + other.block.size*tilesize/2f) && !(other instanceof ConstructBuild);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user