diff --git a/core/src/mindustry/ui/fragments/HudFragment.java b/core/src/mindustry/ui/fragments/HudFragment.java index a8ae12eed2..a5f1269cbc 100644 --- a/core/src/mindustry/ui/fragments/HudFragment.java +++ b/core/src/mindustry/ui/fragments/HudFragment.java @@ -224,7 +224,7 @@ public class HudFragment extends Fragment{ int i = 0; for(Team team : Team.baseTeams){ ImageButton button = teams.button(Tex.whiteui, Styles.clearTogglePartiali, 40f, () -> Call.setPlayerTeamEditor(player, team)) - .size(50f).margin(6f).get(); + .size(50f).margin(6f).get(); button.getImageCell().grow(); button.getStyle().imageUpColor = team.color; button.update(() -> button.setChecked(player.team() == team)); @@ -342,39 +342,39 @@ public class HudFragment extends Fragment{ //TODO DEBUG: rate table if(false) - parent.fill(t -> { - t.name = "rates"; - t.bottom().left(); - t.table(Styles.black6, c -> { - Bits used = new Bits(content.items().size); + parent.fill(t -> { + t.name = "rates"; + t.bottom().left(); + t.table(Styles.black6, c -> { + Bits used = new Bits(content.items().size); - Runnable rebuild = () -> { - c.clearChildren(); + Runnable rebuild = () -> { + c.clearChildren(); - for(Item item : content.items()){ - if(state.rules.sector != null && state.rules.sector.info.getExport(item) >= 1){ - c.image(item.icon(Cicon.small)); - c.label(() -> (int)state.rules.sector.info.getExport(item) + " /s").color(Color.lightGray); - c.row(); + for(Item item : content.items()){ + if(state.rules.sector != null && state.rules.sector.info.getExport(item) >= 1){ + c.image(item.icon(Cicon.small)); + c.label(() -> (int)state.rules.sector.info.getExport(item) + " /s").color(Color.lightGray); + c.row(); + } } - } - }; + }; - c.update(() -> { - boolean wrong = false; - for(Item item : content.items()){ - boolean has = state.rules.sector != null && state.rules.sector.info.getExport(item) >= 1; - if(used.get(item.id) != has){ - used.set(item.id, has); - wrong = true; + c.update(() -> { + boolean wrong = false; + for(Item item : content.items()){ + boolean has = state.rules.sector != null && state.rules.sector.info.getExport(item) >= 1; + if(used.get(item.id) != has){ + used.set(item.id, has); + wrong = true; + } } - } - if(wrong){ - rebuild.run(); - } - }); - }).visible(() -> state.isCampaign() && content.items().contains(i -> state.rules.sector != null && state.rules.sector.info.getExport(i) > 0)); - }); + if(wrong){ + rebuild.run(); + } + }); + }).visible(() -> state.isCampaign() && content.items().contains(i -> state.rules.sector != null && state.rules.sector.info.getExport(i) > 0)); + }); blockfrag.build(parent); } @@ -765,6 +765,7 @@ public class HudFragment extends Fragment{ count[0] = payload.payloadUsed(); } }else{ + count[0] = -1; t.clear(); } }).growX().visible(() -> player.unit() instanceof Payloadc p && p.payloadUsed() > 0).colspan(2); diff --git a/gradle.properties b/gradle.properties index 9b15d50c4d..581d1f703c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=c55aa1fe790c50db389225d9a2287b57f71260ff +archash=78fdeeda71a4bb2d46e81d936beccf8727d95388