From 58ed13fc9645b8818574e0fbab9c12682ff1dbcc Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 6 Sep 2026 16:14:53 -0400 Subject: [PATCH] Mining color alternative --- core/src/mindustry/content/Fx.java | 13 ++++++++++--- core/src/mindustry/entities/comp/MinerComp.java | 8 ++------ .../world/blocks/power/NuclearReactor.java | 8 ++------ 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index bb4615dfd7..b49e251c32 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -2505,26 +2505,33 @@ public class Fx{ }), pulverizeRed = new Effect(40, e -> { + color(Pal.redDust, Pal.stoneGray, e.fin()); randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { - color(Pal.redDust, Pal.stoneGray, e.fin()); Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); }); }), pulverizeSmall = new Effect(30, e -> { + color(Pal.stoneGray); randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> { - color(Pal.stoneGray); Fill.square(e.x + x, e.y + y, e.fout() + 0.5f, 45); }); }), pulverizeMedium = new Effect(30, e -> { + color(Pal.stoneGray); randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { - color(Pal.stoneGray); Fill.square(e.x + x, e.y + y, e.fout() + 0.5f, 45); }); }), + unitMine = new Effect(30, e -> { + color(e.color, Pal.stoneGray, e.finpowdown()); + randLenVectors(e.id, 4, e.fin() * 6f, (x, y) -> { + Fill.square(e.x + x, e.y + y, e.fout() * 1.3f + 0.4f, 45); + }); + }), + producesmoke = new Effect(12, e -> { randLenVectors(e.id, 8, 4f + e.fin() * 18f, (x, y) -> { color(Color.white, Pal.accent, e.fin()); diff --git a/core/src/mindustry/entities/comp/MinerComp.java b/core/src/mindustry/entities/comp/MinerComp.java index 4e9c28bc3d..aaa6958c7a 100644 --- a/core/src/mindustry/entities/comp/MinerComp.java +++ b/core/src/mindustry/entities/comp/MinerComp.java @@ -1,14 +1,10 @@ package mindustry.entities.comp; -import arc.*; -import arc.graphics.*; -import arc.graphics.g2d.*; import arc.math.*; import arc.util.*; import mindustry.annotations.Annotations.*; import mindustry.content.*; import mindustry.gen.*; -import mindustry.graphics.*; import mindustry.input.*; import mindustry.type.*; import mindustry.world.*; @@ -91,8 +87,8 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{ }else if(mining() && item != null){ mineTimer += Time.delta * type.mineSpeed * state.rules.unitMineSpeed(team()); - if(Mathf.chance(0.06 * Time.delta)){ - Fx.pulverizeSmall.at(mineTile.worldx() + Mathf.range(tilesize / 2f), mineTile.worldy() + Mathf.range(tilesize / 2f), 0f, item.color); + if(Mathf.chance(0.07 * Time.delta)){ + Fx.unitMine.at(mineTile.worldx() + Mathf.range(tilesize / 2f), mineTile.worldy() + Mathf.range(tilesize / 2f), 0f, item.color); } if(mineTimer >= 50f + (type.mineHardnessScaling ? item.hardness*15f : 15f)){ diff --git a/core/src/mindustry/world/blocks/power/NuclearReactor.java b/core/src/mindustry/world/blocks/power/NuclearReactor.java index b11af2dc30..7238ce0ae7 100644 --- a/core/src/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/mindustry/world/blocks/power/NuclearReactor.java @@ -92,12 +92,8 @@ public class NuclearReactor extends PowerGenerator{ stats.add(Stat.productionTime, itemDuration / 60f, StatUnit.seconds); } if(heatOutput > 0f && (ui != null && (ui.planet.isShown() ? ui.planet.state.planet : state.isGame() ? state.getPlanet() : null) == Planets.erekir)){ - stats.add(Stat.output, table -> { - //using StatUnit.localized() strips the icon - String unit = "[red]" + Iconc.waves + "[] " + Strings.fixed(heatOutput, 0) + " " + Core.bundle.get("unit.heatunitsperside"); - - table.add(Core.bundle.format("bar.upto", unit)); - }); + //using StatUnit.localized() strips the icon + stats.add(Stat.output, table -> table.add(Core.bundle.format("bar.upto", "[red]" + Iconc.waves + "[] " + Strings.fixed(heatOutput, 0) + " " + Core.bundle.get("unit.heatunitsperside")))); } }