Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -136,16 +136,24 @@ public class Drawf{
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void square(float x, float y, float radius, Color color){
|
public static void square(float x, float y, float radius, float rotation, Color color){
|
||||||
Lines.stroke(3f, Pal.gray);
|
Lines.stroke(3f, Pal.gray);
|
||||||
Lines.square(x, y, radius + 1f, 45);
|
Lines.square(x, y, radius + 1f, rotation);
|
||||||
Lines.stroke(1f, color);
|
Lines.stroke(1f, color);
|
||||||
Lines.square(x, y, radius + 1f, 45);
|
Lines.square(x, y, radius + 1f, rotation);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void square(float x, float y, float radius, float rotation){
|
||||||
|
square(x, y, radius, rotation, Pal.accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void square(float x, float y, float radius, Color color){
|
||||||
|
square(x, y, radius, 45, color);
|
||||||
|
}
|
||||||
|
|
||||||
public static void square(float x, float y, float radius){
|
public static void square(float x, float y, float radius){
|
||||||
square(x, y, radius, Pal.accent);
|
square(x, y, radius, 45);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void arrow(float x, float y, float x2, float y2, float length, float radius){
|
public static void arrow(float x, float y, float x2, float y2, float length, float radius){
|
||||||
|
|||||||
@@ -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