From f21429f3f1c2b6be996fb9415661323705abc431 Mon Sep 17 00:00:00 2001 From: KochiyaUenehaaa <119563256+Uenhe@users.noreply.github.com> Date: Sun, 8 Jun 2025 22:26:28 +0800 Subject: [PATCH] display StatusDuration to one decimal place (#10908) --- core/src/mindustry/content/Blocks.java | 4 ---- core/src/mindustry/world/meta/StatValues.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index fc1b4d5f75..48c2ebd1d5 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -3437,7 +3437,6 @@ public class Blocks{ hitEffect = Fx.hitLancer; despawnEffect = Fx.none; status = StatusEffects.shocked; - statusDuration = 10f; hittable = false; lightColor = Color.white; collidesAir = false; @@ -3489,7 +3488,6 @@ public class Blocks{ despawnEffect = Fx.blastExplosion; status = StatusEffects.blasted; - statusDuration = 60f; hitColor = backColor = trailColor = Pal.blastAmmoBack; frontColor = Pal.blastAmmoFront; @@ -3915,7 +3913,6 @@ public class Blocks{ collidesGround = true; status = StatusEffects.blasted; - statusDuration = 60f; backColor = hitColor = trailColor = Pal.blastAmmoBack; frontColor = Pal.blastAmmoFront; @@ -5455,7 +5452,6 @@ public class Blocks{ hitEffect = Fx.hitLancer; despawnEffect = Fx.none; status = StatusEffects.shocked; - statusDuration = 10f; hittable = false; lightColor = Color.white; buildingDamageMultiplier = 0.25f; diff --git a/core/src/mindustry/world/meta/StatValues.java b/core/src/mindustry/world/meta/StatValues.java index cad7a64a4a..886fa305ab 100644 --- a/core/src/mindustry/world/meta/StatValues.java +++ b/core/src/mindustry/world/meta/StatValues.java @@ -710,7 +710,7 @@ public class StatValues{ if(type.status != StatusEffects.none){ sep(bt, (type.status.hasEmoji() ? type.status.emoji() : "") + "[stat]" + type.status.localizedName + (type.status.reactive ? "" : "[lightgray] ~ [stat]" + - ((int)(type.statusDuration / 60f)) + "[lightgray] " + Core.bundle.get("unit.seconds"))).with(c -> withTooltip(c, type.status)); + Strings.autoFixed(type.statusDuration / 60f, 1) + "[lightgray] " + Core.bundle.get("unit.seconds"))).with(c -> withTooltip(c, type.status)); } if(!type.targetMissiles){