mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 11:29:48 +07:00
Show controlled units on processor hover
This commit is contained in:
parent
8cffab46e0
commit
76124c1b19
@ -8,6 +8,7 @@ import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.*;
|
||||
import mindustry.ai.types.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.gen.*;
|
||||
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){
|
||||
return other != null && other.isValid() && other.team == team && other.within(this, range + other.block.size*tilesize/2f) && !(other instanceof ConstructBuild);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user