Skip to content

Commit

Permalink
Shift the item display over a column instead
Browse files Browse the repository at this point in the history
  • Loading branch information
MEEPofFaith committed Mar 20, 2024
1 parent c3823b8 commit e40dab9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/src/mindustry/world/meta/StatValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static StatValue number(float value, StatUnit unit){
}

public static StatValue liquid(Liquid liquid, float amount, boolean perSecond){
return table -> table.add(new LiquidDisplay(liquid, amount, perSecond));
return table -> table.add(new LiquidDisplay(liquid, amount, perSecond)).left();
}

public static StatValue liquids(Boolf<Liquid> filter, float amount, boolean perSecond){
Expand Down Expand Up @@ -295,31 +295,33 @@ public static StatValue boosters(float reload, float maxUsed, float multiplier,
public static StatValue itemEffMultiplier(Floatf<Item> efficiency, Boolf<Item> filter){
return table -> {
table.row();
table.add().size(0);
table.table(c -> {
c.left();
for(Item item : content.items().select(i -> filter.get(i) && i.unlockedNow() && !i.isHidden())){
c.table(Styles.grayPanel, b -> {
b.image(item.uiIcon).size(40).pad(10f).left().scaling(Scaling.fit);
b.add(item.localizedName).left().grow();
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());
table.row();
}).growX().colspan(table.getColumns() - 2).row();
};
}

public static StatValue liquidEffMultiplier(Floatf<Liquid> efficiency, float amount, Boolf<Liquid> filter){
return table -> {
table.row();
table.add().size(0);
table.table(c -> {
c.left();
for(Liquid liquid : content.liquids().select(l -> filter.get(l) && l.unlockedNow() && !l.isHidden())){
c.table(Styles.grayPanel, b -> {
b.add(new LiquidDisplay(liquid, 40f, amount, true)).pad(10f).left().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()).row();
table.row();
}).growX().colspan(table.getColumns() - 2).row();
};
}

Expand Down

0 comments on commit e40dab9

Please sign in to comment.