@@ -112,7 +112,7 @@ public static StatValue percentModifier(float value){
112
112
}
113
113
114
114
public static StatValue liquid (Liquid liquid , float amount , boolean perSecond ){
115
- return table -> table .add (displayLiquid (liquid , amount , perSecond ));
115
+ return table -> table .add (displayLiquid (liquid , amount , perSecond )). left () ;
116
116
}
117
117
118
118
public static StatValue liquids (Boolf <Liquid > filter , float amount , boolean perSecond ){
@@ -459,6 +459,37 @@ public static StatValue boosters(float reload, float maxUsed, float multiplier,
459
459
};
460
460
}
461
461
462
+ public static StatValue itemEffMultiplier (Floatf <Item > efficiency , float timePeriod , Boolf <Item > filter ){
463
+ return table -> {
464
+ table .getCells ().peek ().growX (); //Expand the spacer on the row above to push everything to the left
465
+ table .row ();
466
+ table .table (c -> {
467
+ for (Item item : content .items ().select (i -> filter .get (i ) && i .unlockedNow () && !i .isHidden ())){
468
+ c .table (Styles .grayPanel , b -> {
469
+ b .image (item .uiIcon ).size (40 ).pad (10f ).left ().scaling (Scaling .fit );
470
+ b .add (item .localizedName + (timePeriod > 0 ? "\n [lightgray]" + Strings .autoFixed (1f / (timePeriod / 60f ), 2 ) + StatUnit .perSecond .localized () : "" )).left ().grow ();
471
+ b .add (Core .bundle .format ("stat.efficiency" , fixValue (efficiency .get (item ) * 100f ))).right ().pad (10f ).padRight (15f );
472
+ }).growX ().pad (5 ).row ();
473
+ }
474
+ }).growX ().colspan (table .getColumns ()).row ();
475
+ };
476
+ }
477
+
478
+ public static StatValue liquidEffMultiplier (Floatf <Liquid > efficiency , float amount , Boolf <Liquid > filter ){
479
+ return table -> {
480
+ table .getCells ().peek ().growX (); //Expand the spacer on the row above to push everything to the left
481
+ table .row ();
482
+ table .table (c -> {
483
+ for (Liquid liquid : content .liquids ().select (l -> filter .get (l ) && l .unlockedNow () && !l .isHidden ())){
484
+ c .table (Styles .grayPanel , b -> {
485
+ b .add (displayLiquid (liquid , amount , true )).pad (10f ).left ().grow ();
486
+ b .add (Core .bundle .format ("stat.efficiency" , fixValue (efficiency .get (liquid ) * 100f ))).right ().pad (10f ).padRight (15f );
487
+ }).growX ().pad (5 ).row ();
488
+ }
489
+ }).growX ().colspan (table .getColumns ()).row ();
490
+ };
491
+ }
492
+
462
493
public static StatValue speedBoosters (String unit , float amount , float speed , boolean strength , Boolf <Liquid > filter ){
463
494
return table -> {
464
495
table .row ();
0 commit comments