aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 18:35:52 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-25 18:35:52 +0100
commit047cd9598a9241b94e17b36e00f02689a60c3d17 (patch)
tree48cee629984d8abdf033b1da0088e2a92994363e /src/main/java/at/hannibal2/skyhanni
parent536b48a1ed3e91e376481a2db29e25fdf741d721 (diff)
downloadskyhanni-047cd9598a9241b94e17b36e00f02689a60c3d17.tar.gz
skyhanni-047cd9598a9241b94e17b36e00f02689a60c3d17.tar.bz2
skyhanni-047cd9598a9241b94e17b36e00f02689a60c3d17.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt27
1 files changed, 14 insertions, 13 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 8b7b6cb7d..61a18a317 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -40,7 +40,8 @@ class ItemDisplayOverlayFeatures {
private fun getStackTip(item: ItemStack): String {
val itemName = item.cleanName()
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(0)) {
+ val itemNumberAsStackSize = SkyHanniMod.feature.inventory.itemNumberAsStackSize
+ if (itemNumberAsStackSize.contains(0)) {
when (itemName) {
"First Master Star" -> return "1"
"Second Master Star" -> return "2"
@@ -50,11 +51,11 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(1) && itemName.matchRegex("(.*)Master Skull - Tier .")) {
+ if (itemNumberAsStackSize.contains(1) && itemName.matchRegex("(.*)Master Skull - Tier .")) {
return itemName.substring(itemName.length - 1)
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(2) && (itemName.contains("Golden ") || itemName.contains(
+ if (itemNumberAsStackSize.contains(2) && (itemName.contains("Golden ") || itemName.contains(
"Diamond "
))
) {
@@ -69,11 +70,11 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(3) && itemName.startsWith("New Year Cake (")) {
+ if (itemNumberAsStackSize.contains(3) && itemName.startsWith("New Year Cake (")) {
return "§b" + itemName.between("(Year ", ")")
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(4)) {
+ if (itemNumberAsStackSize.contains(4)) {
val chestName = InventoryUtils.openInventoryName()
if (!chestName.endsWith("Sea Creature Guide") && ItemUtils.isPet(itemName)) {
petLevelPattern.matchMatcher(itemName) {
@@ -87,7 +88,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(5) && itemName.contains(" Minion ") &&
+ if (itemNumberAsStackSize.contains(5) && itemName.contains(" Minion ") &&
!itemName.contains("Recipe") && item.getLore().any { it.contains("Place this minion") }
) {
val array = itemName.split(" ")
@@ -100,7 +101,7 @@ class ItemDisplayOverlayFeatures {
return (if (itemName.contains("Enchanted")) "§5" else "") + sackName.substring(0, 2)
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(8) && itemName.contains("Kuudra Key")) {
+ if (itemNumberAsStackSize.contains(8) && itemName.contains("Kuudra Key")) {
return when (itemName) {
"Kuudra Key" -> "§a1"
"Hot Kuudra Key" -> "§22"
@@ -111,7 +112,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(9) &&
+ if (itemNumberAsStackSize.contains(9) &&
InventoryUtils.openInventoryName() == "Your Skills" &&
item.getLore().any { it.contains("Click to view!") }
) {
@@ -124,7 +125,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(10) && InventoryUtils.openInventoryName()
+ if (itemNumberAsStackSize.contains(10) && InventoryUtils.openInventoryName()
.endsWith(" Collections")
) {
val lore = item.getLore()
@@ -139,7 +140,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(11) && itemName.contains("Rancher's Boots")) {
+ if (itemNumberAsStackSize.contains(11) && itemName.contains("Rancher's Boots")) {
for (line in item.getLore()) {
rancherBootsSpeedCapPattern.matchMatcher(line) {
return group("cap")
@@ -147,7 +148,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(12) && itemName.contains("Larva Hook")) {
+ if (itemNumberAsStackSize.contains(12) && itemName.contains("Larva Hook")) {
for (line in item.getLore()) {
"§7§7You may harvest §6(?<amount>.).*".toPattern().matchMatcher(line) {
val amount = group("amount").toInt()
@@ -160,7 +161,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(13) && itemName.startsWith("Dungeon ") && itemName.contains(
+ if (itemNumberAsStackSize.contains(13) && itemName.startsWith("Dungeon ") && itemName.contains(
" Potion"
)
) {
@@ -176,7 +177,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(14)) {
+ if (itemNumberAsStackSize.contains(14)) {
if (item.getInternalNameOrNull() in garenVacuumVariants) {
for (line in item.getLore()) {
gardenVacuumPatterm.matchMatcher(line) {