Removing Nulls.unit
This commit is contained in:
@@ -767,7 +767,7 @@ public class HudFragment{
|
||||
}
|
||||
});
|
||||
|
||||
t.add(new SideBar(() -> player.unit().healthf(), () -> true, true)).width(bw).growY().padRight(pad);
|
||||
t.add(new SideBar(() -> player.dead() ? 0f : player.unit().healthf(), () -> true, true)).width(bw).growY().padRight(pad);
|
||||
t.image(() -> player.icon()).scaling(Scaling.bounded).grow().maxWidth(54f);
|
||||
t.add(new SideBar(() -> player.dead() ? 0f : player.displayAmmo() ? player.unit().ammof() : player.unit().healthf(), () -> !player.displayAmmo(), false)).width(bw).growY().padLeft(pad).update(b -> {
|
||||
b.color.set(player.displayAmmo() ? player.dead() || player.unit() instanceof BlockUnitc ? Pal.ammo : player.unit().type.ammoType.color() : Pal.health);
|
||||
@@ -913,7 +913,7 @@ public class HudFragment{
|
||||
|
||||
table.table().update(t -> {
|
||||
t.left();
|
||||
Bits applied = player.unit().statusBits();
|
||||
Bits applied = player.unit() == null ? null : player.unit().statusBits();
|
||||
if(!statuses.equals(applied)){
|
||||
t.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user