This commit is contained in:
Anuken 2021-07-20 13:59:19 -04:00
parent 0f199fa4b4
commit 4c51519b8a
2 changed files with 17 additions and 10 deletions

View file

@ -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

View file

@ -256,6 +256,10 @@ public class StatValues{
}
public static <T extends UnlockableContent> StatValue ammo(ObjectMap<T, BulletType> map){
return ammo(map, 0);
}
public static <T extends UnlockableContent> StatValue ammo(ObjectMap<T, BulletType> 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();
}