From 993fe26c68aeaf39e4a7187df44231ebe48214da Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 28 Sep 2023 08:29:38 +0200 Subject: code cleanup --- .../skyhanni/features/dungeon/CroesusUnopenedChestTracker.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusUnopenedChestTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusUnopenedChestTracker.kt index 5224edd79..7c52f4154 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusUnopenedChestTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusUnopenedChestTracker.kt @@ -23,14 +23,9 @@ class CroesusUnopenedChestTracker { for (slot in InventoryUtils.getItemsInOpenChest()) { val stack = slot.stack val lore = stack.getLore() - if ("§eClick to view chests!" in lore) { - if ("§aNo more Chests to open!" !in lore) { - slot highlight if (lore.any { it.contains("Opened Chest") }) { - LorenzColor.DARK_AQUA - } else { - LorenzColor.DARK_PURPLE - } - } + if ("§eClick to view chests!" in lore && "§aNo more Chests to open!" !in lore) { + val hasOpenedChests = lore.any { it.contains("Opened Chest") } + slot highlight if (hasOpenedChests) LorenzColor.DARK_AQUA else LorenzColor.DARK_PURPLE } } } -- cgit