Make PayloadAmmoTurret accept units (#7320)
This commit is contained in:
@@ -308,10 +308,14 @@ public class StatValues{
|
||||
}
|
||||
|
||||
public static <T extends UnlockableContent> StatValue ammo(ObjectMap<T, BulletType> map){
|
||||
return ammo(map, 0);
|
||||
return ammo(map, 0, false);
|
||||
}
|
||||
|
||||
public static <T extends UnlockableContent> StatValue ammo(ObjectMap<T, BulletType> map, int indent){
|
||||
public static <T extends UnlockableContent> StatValue ammo(ObjectMap<T, BulletType> map, boolean showUnit){
|
||||
return ammo(map, 0, showUnit);
|
||||
}
|
||||
|
||||
public static <T extends UnlockableContent> StatValue ammo(ObjectMap<T, BulletType> map, int indent, boolean showUnit){
|
||||
return table -> {
|
||||
|
||||
table.row();
|
||||
@@ -320,12 +324,12 @@ public class StatValues{
|
||||
orderedKeys.sort();
|
||||
|
||||
for(T t : orderedKeys){
|
||||
boolean compact = t instanceof UnitType || indent > 0;
|
||||
boolean compact = t instanceof UnitType && !showUnit || indent > 0;
|
||||
|
||||
BulletType type = map.get(t);
|
||||
|
||||
if(type.spawnUnit != null && type.spawnUnit.weapons.size > 0){
|
||||
ammo(ObjectMap.of(t, type.spawnUnit.weapons.first().bullet), indent).display(table);
|
||||
ammo(ObjectMap.of(t, type.spawnUnit.weapons.first().bullet), indent, false).display(table);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -406,7 +410,7 @@ public class StatValues{
|
||||
sep(bt, Core.bundle.format("bullet.frags", type.fragBullets));
|
||||
bt.row();
|
||||
|
||||
ammo(ObjectMap.of(t, type.fragBullet), indent + 1).display(bt);
|
||||
ammo(ObjectMap.of(t, type.fragBullet), indent + 1, false).display(bt);
|
||||
}
|
||||
}).padTop(compact ? 0 : -9).padLeft(indent * 8).left().get().background(compact ? null : Tex.underline);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user