Add liquid consumption rates
This commit is contained in:
@@ -28,6 +28,6 @@ public class ConsumeLiquidFlammable extends ConsumeLiquidFilter{
|
||||
|
||||
@Override
|
||||
public void display(Stats stats){
|
||||
stats.add(booster ? Stat.booster : Stat.input, StatValues.liquidEffMultiplier(l -> l.flammability, filter));
|
||||
stats.add(booster ? Stat.booster : Stat.input, StatValues.liquidEffMultiplier(l -> l.flammability, amount * 60f, filter));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,10 +300,7 @@ public class StatValues{
|
||||
c.table(Styles.grayPanel, b -> {
|
||||
b.image(item.uiIcon).size(40).pad(10f).left().scaling(Scaling.fit);
|
||||
b.add(item.localizedName).left().grow();
|
||||
b.table(e -> {
|
||||
e.add(Core.bundle.format("stat.efficiency", fixValue(efficiency.get(item) * 100f))).right().labelAlign(Align.right);
|
||||
}).right().pad(10f).padRight(15f);
|
||||
|
||||
b.add(Core.bundle.format("stat.efficiency", fixValue(efficiency.get(item) * 100f))).right().pad(10f).padRight(15f);
|
||||
}).growX().pad(5).row();
|
||||
}
|
||||
}).growX().colspan(table.getColumns());
|
||||
@@ -311,18 +308,26 @@ public class StatValues{
|
||||
};
|
||||
}
|
||||
|
||||
public static StatValue liquidEffMultiplier(Floatf<Liquid> efficiency, Boolf<Liquid> filter){
|
||||
public static StatValue liquidEffMultiplier(Floatf<Liquid> efficiency, float amount, Boolf<Liquid> filter){
|
||||
return table -> {
|
||||
table.row();
|
||||
table.table(c -> {
|
||||
for(Liquid liquid : content.liquids().select(l -> filter.get(l) && l.unlockedNow() && !l.isHidden())){
|
||||
c.table(Styles.grayPanel, b -> {
|
||||
b.image(liquid.uiIcon).size(40).pad(10f).left().scaling(Scaling.fit);
|
||||
b.add(liquid.localizedName).left().grow();
|
||||
b.add(new Stack(){{
|
||||
Image i = new Image(liquid.uiIcon).setScaling(Scaling.fit);
|
||||
i.setAlign(Align.left);
|
||||
add(i);
|
||||
|
||||
Table t = new Table().left().bottom();
|
||||
t.add(Strings.autoFixed(amount, 2) + StatUnit.perSecond.localized()).style(Styles.outlineLabel);
|
||||
add(t);
|
||||
}}).height(40).pad(10f).padRight(0).left();
|
||||
b.add(liquid.localizedName).left().padLeft(6f).grow();
|
||||
b.add(Core.bundle.format("stat.efficiency", fixValue(efficiency.get(liquid) * 100f))).right().pad(10f).padRight(15f);
|
||||
}).growX().pad(5).row();
|
||||
}
|
||||
}).growX().colspan(table.getColumns());
|
||||
}).growX().colspan(table.getColumns()).row();
|
||||
table.row();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user