From e4b6fdd0a8fa6f565c36514de58fb676e67c53a5 Mon Sep 17 00:00:00 2001 From: Sharlotte <60801210+Sharlottes@users.noreply.github.com> Date: Sat, 17 Sep 2022 03:43:51 +0900 Subject: [PATCH] hotfix --- src/informatis/ui/window/CoreWindow.java | 1 + src/informatis/ui/window/UnitWindow.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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 -> {