Fix janky sublimate ammo display (#8469)

This commit is contained in:
MEEPofFaith
2023-04-03 07:03:24 -07:00
committed by GitHub
parent 76f151789a
commit f55363a932
2 changed files with 7 additions and 4 deletions

View File

@@ -33,7 +33,10 @@ public class ContinuousLiquidTurret extends ContinuousTurret{
stats.remove(Stat.ammo);
//TODO looks bad
stats.add(Stat.ammo, StatValues.number(liquidConsumed * 60f, StatUnit.perSecond, true));
stats.add(Stat.ammo, table -> {
table.row();
StatValues.number(liquidConsumed * 60f, StatUnit.perSecond, true).display(table);
});
stats.add(Stat.ammo, StatValues.ammo(ammoTypes));
}

View File

@@ -51,10 +51,10 @@ public class StatValues{
String l1 = (unit.icon == null ? "" : unit.icon + " ") + fixValue(value), l2 = (unit.space ? " " : "") + unit.localized();
if(merge){
table.add(l1 + l2);
table.add(l1 + l2).left();
}else{
table.add(l1);
table.add(l2);
table.add(l1).left();
table.add(l2).left();
}
};
}