diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt index 3fc3dbcf7..df6949a7e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -67,6 +67,7 @@ object ItemDisplayOverlayFeatures { private fun getStackTip(item: ItemStack): String { val itemName = item.cleanName() val chestName = InventoryUtils.openInventoryName() + val lore = item.getLore() if (MASTER_STAR_TIER.isSelected()) { when (itemName) { @@ -115,7 +116,7 @@ object ItemDisplayOverlayFeatures { } if (MINION_TIER.isSelected() && itemName.contains(" Minion ") && - !itemName.contains("Recipe") && item.getLore().any { it.contains("Place this minion") } + !itemName.contains("Recipe") && lore.any { it.contains("Place this minion") } ) { val array = itemName.split(" ") val last = array[array.size - 1] @@ -140,9 +141,9 @@ object ItemDisplayOverlayFeatures { if (SKILL_LEVEL.isSelected() && InventoryUtils.openInventoryName() == "Your Skills" && - item.getLore().any { it.contains("Click to view!") } + lore.any { it.contains("Click to view!") } ) { - if (CollectionAPI.isCollectionTier0(item.getLore())) return "0" + if (CollectionAPI.isCollectionTier0(lore)) return "0" val split = itemName.split(" ") if (!itemName.contains("Dungeon")) { val text = split.last() @@ -152,7 +153,6 @@ object ItemDisplayOverlayFeatures { } if (COLLECTION_LEVEL.isSelected() && InventoryUtils.openInventoryName().endsWith(" Collections")) { - val lore = item.getLore() if (lore.any { it.contains("Click to view!") }) { if (CollectionAPI.isCollectionTier0(lore)) return "0" item.name?.let { @@ -177,7 +177,7 @@ object ItemDisplayOverlayFeatures { } if (LARVA_HOOK.isSelected() && itemName.contains("Larva Hook")) { - for (line in item.getLore()) { + for (line in lore) { harvestPattern.matchMatcher(line) { val amount = group("amount").toInt() return when { @@ -203,7 +203,7 @@ object ItemDisplayOverlayFeatures { } if (VACUUM_GARDEN.isSelected() && item.getInternalNameOrNull() in PestAPI.vacuumVariants) { - for (line in item.getLore()) { + for (line in lore) { gardenVacuumPatterm.matchMatcher(line) { val pests = group("amount").formatNumber() return if (config.vacuumBagCap) { @@ -233,8 +233,8 @@ object ItemDisplayOverlayFeatures { } } - if (BINGO_GOAL_RANK.isSelected() && chestName == "Bingo Card" && item.getLore().lastOrNull() == "§aGOAL REACHED") { - for (line in item.getLore()) { + if (BINGO_GOAL_RANK.isSelected() && chestName == "Bingo Card" && lore.lastOrNull() == "§aGOAL REACHED") { + for (line in lore) { bingoGoalRankPattern.matchMatcher(line) { val rank = group("rank").formatNumber() if (rank < 10000) return "§6${NumberUtil.format(rank)}" |