From ee03469f7c1ec353513d6c8f477cc7331556d810 Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Wed, 8 Jun 2022 08:28:15 -0400 Subject: [PATCH] Fix inconsistent power bar name (#6942) * Fix inconsistent power bar name * Fix missing power generation bar The boolean i removed was flipped, i don't even know why this check exists at all so i made it go poof --- core/src/mindustry/world/blocks/power/ImpactReactor.java | 2 +- core/src/mindustry/world/blocks/power/PowerGenerator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/world/blocks/power/ImpactReactor.java b/core/src/mindustry/world/blocks/power/ImpactReactor.java index 0eadcfc609..e256f4ba56 100644 --- a/core/src/mindustry/world/blocks/power/ImpactReactor.java +++ b/core/src/mindustry/world/blocks/power/ImpactReactor.java @@ -50,7 +50,7 @@ public class ImpactReactor extends PowerGenerator{ public void setBars(){ super.setBars(); - addBar("poweroutput", (GeneratorBuild entity) -> new Bar(() -> + addBar("power", (GeneratorBuild entity) -> new Bar(() -> Core.bundle.format("bar.poweroutput", Strings.fixed(Math.max(entity.getPowerProduction() - consPower.usage, 0) * 60 * entity.timeScale(), 1)), () -> Pal.powerBar, diff --git a/core/src/mindustry/world/blocks/power/PowerGenerator.java b/core/src/mindustry/world/blocks/power/PowerGenerator.java index cfab097ec4..d534454e69 100644 --- a/core/src/mindustry/world/blocks/power/PowerGenerator.java +++ b/core/src/mindustry/world/blocks/power/PowerGenerator.java @@ -47,7 +47,7 @@ public class PowerGenerator extends PowerDistributor{ public void setBars(){ super.setBars(); - if(hasPower && outputsPower && consPower != null){ + if(hasPower && outputsPower){ addBar("power", (GeneratorBuild entity) -> new Bar(() -> Core.bundle.format("bar.poweroutput", Strings.fixed(entity.getPowerProduction() * 60 * entity.timeScale(), 1)),