From ff115ee3761496589b45feeaa54b294b3653b319 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 1 Nov 2022 10:57:41 -0400 Subject: [PATCH] Heat icon --- core/src/mindustry/content/Blocks.java | 6 +++--- core/src/mindustry/world/meta/StatUnit.java | 10 +++++++++- core/src/mindustry/world/meta/StatValues.java | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 5869bc461f..b6456795cb 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1808,7 +1808,7 @@ public class Blocks{ requirements(Category.effect, with(Items.silicon, 150, Items.oxide, 40, Items.thorium, 60)); outlineColor = Pal.darkOutline; - range = 180f; + range = 200f; size = 3; buildSpeed = 1.5f; @@ -5615,7 +5615,7 @@ public class Blocks{ requirements(Category.units, with(Items.silicon, 100, Items.beryllium, 150, Items.tungsten, 80)); regionSuffix = "-dark"; hasPower = true; - buildSpeed = 0.5f; + buildSpeed = 0.6f; consumePower(2f); size = 3; //TODO expand this list @@ -5627,7 +5627,7 @@ public class Blocks{ requirements(Category.units, with(Items.silicon, 150, Items.oxide, 150, Items.tungsten, 200, Items.phaseFabric, 40)); regionSuffix = "-dark"; hasPower = true; - buildSpeed = 0.6f; + buildSpeed = 0.75f; maxBlockSize = 4; minBlockSize = 3; size = 5; diff --git a/core/src/mindustry/world/meta/StatUnit.java b/core/src/mindustry/world/meta/StatUnit.java index d0c75ae789..ede384c7f8 100644 --- a/core/src/mindustry/world/meta/StatUnit.java +++ b/core/src/mindustry/world/meta/StatUnit.java @@ -1,6 +1,8 @@ package mindustry.world.meta; import arc.*; +import arc.util.*; +import mindustry.gen.*; import java.util.*; @@ -18,7 +20,7 @@ public class StatUnit{ itemsSecond = new StatUnit("itemsSecond"), liquidUnits = new StatUnit("liquidUnits"), powerUnits = new StatUnit("powerUnits"), - heatUnits = new StatUnit("heatUnits"), + heatUnits = new StatUnit("heatUnits", "[red]" + Iconc.waves + "[]"), degrees = new StatUnit("degrees"), seconds = new StatUnit("seconds"), minutes = new StatUnit("minutes"), @@ -33,6 +35,7 @@ public class StatUnit{ public final boolean space; public final String name; + public @Nullable String icon; public StatUnit(String name, boolean space){ this.name = name; @@ -43,6 +46,11 @@ public class StatUnit{ this(name, true); } + public StatUnit(String name, String icon){ + this(name, true); + this.icon = icon; + } + public String localized(){ if(this == none) return ""; return Core.bundle.get("unit." + name.toLowerCase(Locale.ROOT)); diff --git a/core/src/mindustry/world/meta/StatValues.java b/core/src/mindustry/world/meta/StatValues.java index a562f26ecb..b7b21fb98b 100644 --- a/core/src/mindustry/world/meta/StatValues.java +++ b/core/src/mindustry/world/meta/StatValues.java @@ -49,7 +49,7 @@ public class StatValues{ public static StatValue number(float value, StatUnit unit, boolean merge){ return table -> { - String l1 = fixValue(value), l2 = (unit.space ? " " : "") + unit.localized(); + String l1 = (unit.icon == null ? "" : unit.icon + " ") + fixValue(value), l2 = (unit.space ? " " : "") + unit.localized(); if(merge){ table.add(l1 + l2);