From cc3c358cc28d4923b54230fd40d4c4cf444c0cda Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 2 Oct 2022 22:08:54 -0400 Subject: [PATCH] Misc cleanup --- .../src/mindustry/world/blocks/campaign/Accelerator.java | 2 +- core/src/mindustry/world/blocks/power/PowerNode.java | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/src/mindustry/world/blocks/campaign/Accelerator.java b/core/src/mindustry/world/blocks/campaign/Accelerator.java index a111aff5d7..03492feafe 100644 --- a/core/src/mindustry/world/blocks/campaign/Accelerator.java +++ b/core/src/mindustry/world/blocks/campaign/Accelerator.java @@ -110,7 +110,7 @@ public class Accelerator extends Block{ if(!state.isCampaign() || efficiency <= 0f) return; - ui.showInfo("This block doesn't work properly in the beta/alpha. It maybe removed, or reworked. Check back in a later update."); + ui.showInfo("This block doesn't work properly in the beta/alpha. It may be removed, or reworked. Check back in a later update."); if(false) ui.planet.showPlanetLaunch(state.rules.sector, sector -> { diff --git a/core/src/mindustry/world/blocks/power/PowerNode.java b/core/src/mindustry/world/blocks/power/PowerNode.java index c13438a9c1..80295854cf 100644 --- a/core/src/mindustry/world/blocks/power/PowerNode.java +++ b/core/src/mindustry/world/blocks/power/PowerNode.java @@ -26,9 +26,8 @@ public class PowerNode extends PowerBlock{ protected static BuildPlan otherReq; protected static int returnInt = 0; protected final static ObjectSet graphs = new ObjectSet<>(); - /** The maximum range of all power nodes on the map */ - public static float maxRange; + protected static float maxRange; public @Load("laser") TextureRegion laser; public @Load("laser-end") TextureRegion laserEnd; @@ -92,14 +91,12 @@ public class PowerNode extends PowerBlock{ //clear old for(int i = 0; i < old.size; i++){ - int cur = old.get(i); - configurations.get(Integer.class).get(tile, cur); + configurations.get(Integer.class).get(tile, old.get(i)); } //set new for(Point2 p : value){ - int newPos = Point2.pack(p.x + tile.tileX(), p.y + tile.tileY()); - configurations.get(Integer.class).get(tile, newPos); + configurations.get(Integer.class).get(tile, Point2.pack(p.x + tile.tileX(), p.y + tile.tileY())); } }); }