From 76124c1b19eae300b1bbdc02b2e4c48c199e435b Mon Sep 17 00:00:00 2001 From: summetdev Date: Tue, 27 Oct 2020 20:30:41 +0300 Subject: [PATCH] Show controlled units on processor hover --- core/src/mindustry/world/blocks/logic/LogicBlock.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/mindustry/world/blocks/logic/LogicBlock.java b/core/src/mindustry/world/blocks/logic/LogicBlock.java index e06468984b..8ccc558299 100644 --- a/core/src/mindustry/world/blocks/logic/LogicBlock.java +++ b/core/src/mindustry/world/blocks/logic/LogicBlock.java @@ -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); }