From 144793592b45bcb45ec6eeff01869f13dc938d93 Mon Sep 17 00:00:00 2001 From: EggleEgg <125359838+EggleEgg@users.noreply.github.com> Date: Mon, 19 Jan 2026 15:09:36 +0100 Subject: [PATCH] Add Firerate Stat to Lustre and sublimate --- core/src/mindustry/entities/bullet/BulletType.java | 2 +- .../mindustry/entities/bullet/ContinuousBulletType.java | 2 +- .../mindustry/entities/bullet/PointLaserBulletType.java | 2 +- core/src/mindustry/world/meta/StatValues.java | 7 ++----- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 9e2b10e846..e64cf10c86 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -427,7 +427,7 @@ public class BulletType extends Content implements Cloneable{ return Math.max(Mathf.zero(drag) ? speed * lifetime : speed * (1f - Mathf.pow(1f - drag, lifetime)) / drag, maxRange); } - /** @return continuous damage in damage/sec, or -1 if not continuous. */ + /** @return continuous damage interval per second, or -1 if not continuous. */ public float continuousDamage(){ return -1f; } diff --git a/core/src/mindustry/entities/bullet/ContinuousBulletType.java b/core/src/mindustry/entities/bullet/ContinuousBulletType.java index 9dfb85ad25..90ffdb93b5 100644 --- a/core/src/mindustry/entities/bullet/ContinuousBulletType.java +++ b/core/src/mindustry/entities/bullet/ContinuousBulletType.java @@ -32,7 +32,7 @@ public class ContinuousBulletType extends BulletType{ @Override public float continuousDamage(){ if(!continuous) return -1f; - return damage / damageInterval * 60f; + return 60f / damageInterval; } @Override diff --git a/core/src/mindustry/entities/bullet/PointLaserBulletType.java b/core/src/mindustry/entities/bullet/PointLaserBulletType.java index ca81ce7ad7..d317afd0e1 100644 --- a/core/src/mindustry/entities/bullet/PointLaserBulletType.java +++ b/core/src/mindustry/entities/bullet/PointLaserBulletType.java @@ -47,7 +47,7 @@ public class PointLaserBulletType extends BulletType{ @Override public float continuousDamage(){ - return damage / damageInterval * 60f; + return 60f / damageInterval; } @Override diff --git a/core/src/mindustry/world/meta/StatValues.java b/core/src/mindustry/world/meta/StatValues.java index 8556ef3adc..f124084683 100644 --- a/core/src/mindustry/world/meta/StatValues.java +++ b/core/src/mindustry/world/meta/StatValues.java @@ -640,11 +640,8 @@ public class StatValues{ } if(type.damage > 0 && (type.collides || type.splashDamage <= 0)){ - if(type.continuousDamage() > 0){ - bt.add(Core.bundle.format("bullet.damage", type.continuousDamage()) + StatUnit.perSecond.localized()); - }else{ - bt.add(Core.bundle.format("bullet.damage", type.damage)); - } + bt.add(Core.bundle.format("bullet.damage", type.damage) + (type.continuousDamage() > 0 ? + "[lightgray] ~ [stat]" + Strings.autoFixed(type.continuousDamage(), 0) + "[lightgray] " + StatUnit.perSecond.localized() : "")); } if(type.buildingDamageMultiplier != 1){