diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index f260f639fe..9827c1af87 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -795,7 +795,7 @@ bullet.damage = [stat]{0}[lightgray] damage bullet.splashdamage = [stat]{0}[lightgray] area dmg ~[stat] {1}[lightgray] tiles bullet.incendiary = [stat]incendiary bullet.homing = [stat]homing -bullet.frag = [stat]frag +bullet.frags = [stat]{0}[lightgray]x frag bullets: bullet.lightning = [stat]{0}[lightgray]x lightning ~ [stat]{1}[lightgray] damage bullet.buildingdamage = [stat]{0}%[lightgray] building damage bullet.knockback = [stat]{0}[lightgray] knockback diff --git a/core/src/mindustry/world/meta/StatValues.java b/core/src/mindustry/world/meta/StatValues.java index 4926ed3516..5f83234dcf 100644 --- a/core/src/mindustry/world/meta/StatValues.java +++ b/core/src/mindustry/world/meta/StatValues.java @@ -256,6 +256,10 @@ public class StatValues{ } public static StatValue ammo(ObjectMap map){ + return ammo(map, 0); + } + + public static StatValue ammo(ObjectMap map, int indent){ return table -> { table.row(); @@ -264,12 +268,12 @@ public class StatValues{ orderedKeys.sort(); for(T t : orderedKeys){ - boolean unit = t instanceof UnitType; + boolean compact = t instanceof UnitType || indent > 0; BulletType type = map.get(t); //no point in displaying unit icon twice - if(!unit & !(t instanceof PowerTurret)){ + if(!compact && !(t instanceof PowerTurret)){ table.image(icon(t)).size(3 * 8).padRight(4).right().top(); table.add(t.localizedName).padRight(10).left().top(); } @@ -293,11 +297,11 @@ public class StatValues{ sep(bt, Core.bundle.format("bullet.splashdamage", (int)type.splashDamage, Strings.fixed(type.splashDamageRadius / tilesize, 1))); } - if(!unit && !Mathf.equal(type.ammoMultiplier, 1f) && type.displayAmmoMultiplier){ + if(!compact && !Mathf.equal(type.ammoMultiplier, 1f) && type.displayAmmoMultiplier){ sep(bt, Core.bundle.format("bullet.multiplier", (int)type.ammoMultiplier)); } - if(!Mathf.equal(type.reloadMultiplier, 1f)){ + if(!compact && !Mathf.equal(type.reloadMultiplier, 1f)){ sep(bt, Core.bundle.format("bullet.reload", Strings.autoFixed(type.reloadMultiplier, 2))); } @@ -325,14 +329,17 @@ public class StatValues{ sep(bt, Core.bundle.format("bullet.lightning", type.lightning, type.lightningDamage < 0 ? type.damage : type.lightningDamage)); } - if(type.fragBullet != null){ - sep(bt, "@bullet.frag"); - } - if(type.status != StatusEffects.none){ sep(bt, (type.minfo.mod == null ? type.status.emoji() : "") + "[stat]" + type.status.localizedName); } - }).padTop(unit ? 0 : -9).left().get().background(unit ? null : Tex.underline); + + if(type.fragBullet != null){ + sep(bt, Core.bundle.format("bullet.frags", type.fragBullets)); + bt.row(); + + ammo(ObjectMap.of(t, type.fragBullet), indent + 1).display(bt); + } + }).padTop(compact ? 0 : -9).padLeft(indent * 8).left().get().background(compact ? null : Tex.underline); table.row(); }