Better Ability Stats (#9654)

* Fix armor plate multiplier + change Math.round to Strings.autoFixed

* Missing ability name bundles

* Center ability name

* SuppressionFieldAbility stats

* Is two per row is acceptable?

I can revert this commit if not.

* LiquidExplodeAbility stat display

* MoveLightningAbility stat display

* Better SpawnDeathAbility display

* Fix multiplier coloring inconsistencies

Some had [lightgray] before %/x, some had it after

* Consistent content name display

Match with bullet status effects

* Consistent stat formatting

Convert from some being "stat: #" and some being "# stat" to all being "# stat"

* Re-order stats

* Optimize Imports

* Add ability descriptions

* Apparently I forgot LiquidRegenAbility

* Mention healing allies if displayHeal = true
This commit is contained in:
MEEPofFaith
2024-03-29 21:11:39 -07:00
committed by GitHub
parent d8c1ea17e1
commit 2fb5bc56c6
18 changed files with 182 additions and 80 deletions

View File

@@ -374,17 +374,23 @@ public class StatValues{
public static StatValue abilities(Seq<Ability> abilities){
return table -> {
table.row();
table.table(t -> abilities.each(ability -> {
if(ability.display){
t.row();
t.table(Styles.grayPanel, a -> {
a.add("[accent]" + ability.localized()).padBottom(4);
a.row();
a.left().top().defaults().left();
ability.addStats(a);
}).pad(5).margin(10).growX();
}
}));
table.table(t -> {
int count = 0;
for(Ability ability : abilities){
if(ability.display){
t.table(Styles.grayPanel, a -> {
a.add("[accent]" + ability.localized()).padBottom(4).center().top().expandX();
a.row();
a.left().top().defaults().left();
ability.addStats(a);
}).pad(5).margin(10).growX().top().uniformX();
if((++count) == 2){
count = 0;
t.row();
}
}
};
});
};
}
@@ -496,7 +502,7 @@ public class StatValues{
}
if(type.status != StatusEffects.none){
sep(bt, (type.status.minfo.mod == null ? type.status.emoji() : "") + "[stat]" + type.status.localizedName + (type.status.reactive ? "" : "[lightgray] ~ [stat]" + ((int)(type.statusDuration / 60f)) + "[lightgray] " + Core.bundle.get("unit.seconds")));
sep(bt, (type.status.hasEmoji() ? type.status.emoji() : "") + "[stat]" + type.status.localizedName + (type.status.reactive ? "" : "[lightgray] ~ [stat]" + ((int)(type.statusDuration / 60f)) + "[lightgray] " + Core.bundle.get("unit.seconds")));
}
if(type.intervalBullet != null){
@@ -554,4 +560,4 @@ public class StatValues{
private static TextureRegion icon(UnlockableContent t){
return t.uiIcon;
}
}
}