Display Interval Bullet in Stats + Collapsers (#8366)
* Display interval bullets in stats * Collapsers for sub-bullets * highlight /sec as well * top
This commit is contained in:
@@ -993,6 +993,7 @@ bullet.splashdamage = [stat]{0}[lightgray] area dmg ~[stat] {1}[lightgray] tiles
|
|||||||
bullet.incendiary = [stat]incendiary
|
bullet.incendiary = [stat]incendiary
|
||||||
bullet.homing = [stat]homing
|
bullet.homing = [stat]homing
|
||||||
bullet.armorpierce = [stat]armor piercing
|
bullet.armorpierce = [stat]armor piercing
|
||||||
|
bullet.interval = [stat]{0}/sec[lightgray] interval bullets:
|
||||||
bullet.frags = [stat]{0}[lightgray]x frag bullets:
|
bullet.frags = [stat]{0}[lightgray]x frag bullets:
|
||||||
bullet.lightning = [stat]{0}[lightgray]x lightning ~ [stat]{1}[lightgray] damage
|
bullet.lightning = [stat]{0}[lightgray]x lightning ~ [stat]{1}[lightgray] damage
|
||||||
bullet.buildingdamage = [stat]{0}%[lightgray] building damage
|
bullet.buildingdamage = [stat]{0}%[lightgray] building damage
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ public class StatValues{
|
|||||||
}
|
}
|
||||||
|
|
||||||
table.table(bt -> {
|
table.table(bt -> {
|
||||||
bt.left().defaults().padRight(3).left();
|
bt.left().top().defaults().padRight(3).left();
|
||||||
|
|
||||||
if(type.damage > 0 && (type.collides || type.splashDamage <= 0)){
|
if(type.damage > 0 && (type.collides || type.splashDamage <= 0)){
|
||||||
if(type.continuousDamage() > 0){
|
if(type.continuousDamage() > 0){
|
||||||
@@ -407,11 +407,40 @@ public class StatValues{
|
|||||||
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.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")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.fragBullet != null){
|
if(type.intervalBullet != null){
|
||||||
sep(bt, Core.bundle.format("bullet.frags", type.fragBullets));
|
|
||||||
bt.row();
|
bt.row();
|
||||||
|
|
||||||
ammo(ObjectMap.of(t, type.fragBullet), indent + 1, false).display(bt);
|
Table ic = new Table();
|
||||||
|
ammo(ObjectMap.of(t, type.intervalBullet), indent + 1, false).display(ic);
|
||||||
|
Collapser coll = new Collapser(ic, true);
|
||||||
|
coll.setDuration(0.1f);
|
||||||
|
|
||||||
|
bt.table(it -> {
|
||||||
|
it.left().defaults().left();
|
||||||
|
|
||||||
|
it.add(Core.bundle.format("bullet.interval", Strings.autoFixed(type.intervalBullets / type.bulletInterval * 60, 2)));
|
||||||
|
it.button(Icon.downOpen, Styles.emptyi, () -> coll.toggle(false)).update(i -> i.getStyle().imageUp = (!coll.isCollapsed() ? Icon.upOpen : Icon.downOpen)).size(8).padLeft(16f).expandX();
|
||||||
|
});
|
||||||
|
bt.row();
|
||||||
|
bt.add(coll);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(type.fragBullet != null){
|
||||||
|
bt.row();
|
||||||
|
|
||||||
|
Table fc = new Table();
|
||||||
|
ammo(ObjectMap.of(t, type.fragBullet), indent + 1, false).display(fc);
|
||||||
|
Collapser coll = new Collapser(fc, true);
|
||||||
|
coll.setDuration(0.1f);
|
||||||
|
|
||||||
|
bt.table(ft -> {
|
||||||
|
ft.left().defaults().left();
|
||||||
|
|
||||||
|
ft.add(Core.bundle.format("bullet.frags", type.fragBullets));
|
||||||
|
ft.button(Icon.downOpen, Styles.emptyi, () -> coll.toggle(false)).update(i -> i.getStyle().imageUp = (!coll.isCollapsed() ? Icon.upOpen : Icon.downOpen)).size(8).padLeft(16f).expandX();
|
||||||
|
});
|
||||||
|
bt.row();
|
||||||
|
bt.add(coll);
|
||||||
}
|
}
|
||||||
}).padTop(compact ? 0 : -9).padLeft(indent * 8).left().get().background(compact ? null : Tex.underline);
|
}).padTop(compact ? 0 : -9).padLeft(indent * 8).left().get().background(compact ? null : Tex.underline);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user