From 990562dd7102b94898271052aeb64afe00868f07 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 27 Dec 2020 16:20:06 -0500 Subject: [PATCH] Use sector preset name for maps if possible --- core/src/mindustry/core/World.java | 2 +- core/src/mindustry/world/blocks/power/PowerGraph.java | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/core/src/mindustry/core/World.java b/core/src/mindustry/core/World.java index 92c32a6c2c..9751a3cd0d 100644 --- a/core/src/mindustry/core/World.java +++ b/core/src/mindustry/core/World.java @@ -268,7 +268,7 @@ public class World{ } private void setSectorRules(Sector sector){ - state.map = new Map(StringMap.of("name", sector.planet.localizedName + "; Sector " + sector.id)); + state.map = new Map(StringMap.of("name", sector.preset == null ? sector.planet.localizedName + "; Sector " + sector.id : sector.preset.localizedName)); state.rules.sector = sector; state.rules.weather.clear(); diff --git a/core/src/mindustry/world/blocks/power/PowerGraph.java b/core/src/mindustry/world/blocks/power/PowerGraph.java index 813b183e3f..26c34268d9 100644 --- a/core/src/mindustry/world/blocks/power/PowerGraph.java +++ b/core/src/mindustry/world/blocks/power/PowerGraph.java @@ -12,17 +12,6 @@ public class PowerGraph{ private static final Seq outArray1 = new Seq<>(); private static final Seq outArray2 = new Seq<>(); private static final IntSet closedSet = new IntSet(); - private static final PowerGraph nullGraph = new PowerGraph(){ - @Override - public void add(Building build){ - throw new RuntimeException("cannot add to null graph"); - } - - @Override - public void addGraph(PowerGraph graph){ - throw new RuntimeException("cannot add to null graph"); - } - }; private final Seq producers = new Seq<>(false); private final Seq consumers = new Seq<>(false);