mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 12:09:27 +02:00
clean up
This commit is contained in:
@@ -24,7 +24,6 @@ import mindustry.world.*;
|
|||||||
import mindustry.world.blocks.defense.turrets.*;
|
import mindustry.world.blocks.defense.turrets.*;
|
||||||
import mindustry.world.blocks.distribution.*;
|
import mindustry.world.blocks.distribution.*;
|
||||||
import mindustry.world.blocks.payloads.*;
|
import mindustry.world.blocks.payloads.*;
|
||||||
import mindustry.world.blocks.power.*;
|
|
||||||
import mindustry.world.blocks.storage.*;
|
import mindustry.world.blocks.storage.*;
|
||||||
import mindustry.world.blocks.units.*;
|
import mindustry.world.blocks.units.*;
|
||||||
|
|
||||||
@@ -39,7 +38,6 @@ public class OverDrawer {
|
|||||||
public static Seq<MassDriver.MassDriverBuild> linkedMasses = new Seq<>();
|
public static Seq<MassDriver.MassDriverBuild> linkedMasses = new Seq<>();
|
||||||
public static Seq<PayloadMassDriver.PayloadDriverBuild> linkedPayloadMasses = new Seq<>();
|
public static Seq<PayloadMassDriver.PayloadDriverBuild> linkedPayloadMasses = new Seq<>();
|
||||||
public static Seq<Building> linkedNodes = new Seq<>();
|
public static Seq<Building> linkedNodes = new Seq<>();
|
||||||
public static Seq<Building> linkedBuilds = new Seq<>();
|
|
||||||
public static Seq<Tile> pathTiles = new Seq<>();
|
public static Seq<Tile> pathTiles = new Seq<>();
|
||||||
public static FrameBuffer effectBuffer = new FrameBuffer();
|
public static FrameBuffer effectBuffer = new FrameBuffer();
|
||||||
public static int otherCores;
|
public static int otherCores;
|
||||||
@@ -59,9 +57,7 @@ public class OverDrawer {
|
|||||||
Tmp.v1.set(camera.position);
|
Tmp.v1.set(camera.position);
|
||||||
Lines.stroke(1f + sin / 2, Pal.accent);
|
Lines.stroke(1f + sin / 2, Pal.accent);
|
||||||
Lines.circle(Tmp.v1.x, Tmp.v1.y, leng - 4f);
|
Lines.circle(Tmp.v1.x, Tmp.v1.y, leng - 4f);
|
||||||
spawner.getSpawns().each(t -> {
|
spawner.getSpawns().each(t -> Drawf.arrow(Tmp.v1.x, Tmp.v1.y, t.worldx(), t.worldy(), leng, (Math.min(200 * 8f, Mathf.dst(Tmp.v1.x, Tmp.v1.y, t.worldx(), t.worldy())) / (200 * 8f)) * (5f + sin)));
|
||||||
Drawf.arrow(Tmp.v1.x, Tmp.v1.y, t.worldx(), t.worldy(), leng, (Math.min(200 * 8f, Mathf.dst(Tmp.v1.x, Tmp.v1.y, t.worldx(), t.worldy())) / (200 * 8f)) * (5f + sin));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(settings.getBool("select")) {
|
if(settings.getBool("select")) {
|
||||||
@@ -321,9 +317,10 @@ public class OverDrawer {
|
|||||||
if(node.power == null) return;
|
if(node.power == null) return;
|
||||||
if(!linkedNodes.contains(node)) {
|
if(!linkedNodes.contains(node)) {
|
||||||
linkedNodes.add(node);
|
linkedNodes.add(node);
|
||||||
getPowerLinkedBuilds(node).each(i -> {
|
int[] builds = getPowerLinkedBuilds(node).items;
|
||||||
|
for(int i : builds) {
|
||||||
Building other = world.build(i);
|
Building other = world.build(i);
|
||||||
if(other.power == null) return;
|
if(other == null || other.power == null) return;
|
||||||
float angle1 = Angles.angle(node.x, node.y, other.x, other.y),
|
float angle1 = Angles.angle(node.x, node.y, other.x, other.y),
|
||||||
vx = Mathf.cosDeg(angle1), vy = Mathf.sinDeg(angle1),
|
vx = Mathf.cosDeg(angle1), vy = Mathf.sinDeg(angle1),
|
||||||
len1 = node.block.size * tilesize / 2f - 1.5f, len2 = other.block.size * tilesize / 2f - 1.5f;
|
len1 = node.block.size * tilesize / 2f - 1.5f, len2 = other.block.size * tilesize / 2f - 1.5f;
|
||||||
@@ -332,7 +329,7 @@ public class OverDrawer {
|
|||||||
Drawf.laser(node.team, atlas.find("unitinfo-Slaser"), atlas.find("unitinfo-Slaser-end"), node.x + vx * len1, node.y + vy * len1, other.x - vx * len2, other.y - vy * len2, 0.25f);
|
Drawf.laser(node.team, atlas.find("unitinfo-Slaser"), atlas.find("unitinfo-Slaser-end"), node.x + vx * len1, node.y + vy * len1, other.x - vx * len2, other.y - vy * len2, 0.25f);
|
||||||
|
|
||||||
drawNodeLink(other);
|
drawNodeLink(other);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user