aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-16 12:24:08 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-16 12:24:08 +0100
commit6146bb97e771ab8061b988d184e4c70f48ab6130 (patch)
tree6c82c7ee660f0f5d6ca8ed8c8d09722f3e0bbfc1 /src/main
parentfb224f34544a87b4cb3af7ef242ac9daf74369f0 (diff)
downloadskyhanni-6146bb97e771ab8061b988d184e4c70f48ab6130.tar.gz
skyhanni-6146bb97e771ab8061b988d184e4c70f48ab6130.tar.bz2
skyhanni-6146bb97e771ab8061b988d184e4c70f48ab6130.zip
having one final lore instance
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt16
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)}"