diff --git a/src/informatis/ui/window/CoreWindow.java b/src/informatis/ui/window/CoreWindow.java index e1c562e..bff9fbf 100644 --- a/src/informatis/ui/window/CoreWindow.java +++ b/src/informatis/ui/window/CoreWindow.java @@ -137,6 +137,7 @@ public class CoreWindow extends Window implements Updatable { }), new Table(ttt -> { ttt.bottom().right(); + if(itemData.get(team) == null) return; int amount = itemData.get(team).updateItems.isEmpty()?0:Mathf.floor(itemData.get(team).updateItems.get(item.id).amount); Label label = new Label(amount + "/s"); label.setFontScale(0.65f); diff --git a/src/informatis/ui/window/UnitWindow.java b/src/informatis/ui/window/UnitWindow.java index 2010dbc..54483d9 100644 --- a/src/informatis/ui/window/UnitWindow.java +++ b/src/informatis/ui/window/UnitWindow.java @@ -101,9 +101,9 @@ public class UnitWindow extends Window { }) .tooltip(tool -> { tool.background(Styles.black6); - tool.label(() -> target instanceof Unit u ? u.isPlayer() ? u.getPlayer().name : "AI" : "").visible(target instanceof Unit).row(); + tool.label(() -> target instanceof Unit u ? u.isPlayer() ? u.getPlayer().name : "AI" : "").row(); tool.label(() -> target.tileX() + ", " + target.tileY()).row(); - tool.label(() -> target instanceof Unit u ? "[accent]"+ Strings.fixed(u.armor, 0) + "[] Armor" : "").visible(target instanceof Unit); + tool.label(() -> target instanceof Unit u ? "[accent]"+ Strings.fixed(u.armor, 0) + "[] Armor" : ""); }).get() ).margin(3f).growX().row(); table.table().update(tt -> {