aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorFazfoxy <78978526+Fazfoxy@users.noreply.github.com>2024-09-28 12:52:56 +0100
committerGitHub <noreply@github.com>2024-09-28 21:52:56 +1000
commit633b8f0bdd9b05f553b1bc521a83b4b7de238125 (patch)
tree7b167a9617f67b7f711e854c9293614ca415ed47 /src/main/java/at/hannibal2/skyhanni
parent122d6c830ba94fcd7c512960d5c5ab11d75fd1d5 (diff)
downloadskyhanni-633b8f0bdd9b05f553b1bc521a83b4b7de238125.tar.gz
skyhanni-633b8f0bdd9b05f553b1bc521a83b4b7de238125.tar.bz2
skyhanni-633b8f0bdd9b05f553b1bc521a83b4b7de238125.zip
Fix: Diamond/Golden heads + Master Skulls using Name not ID causing an incompatibility with NEURenamed items (#2611)
Co-authored-by: Cal <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt30
1 files changed, 15 insertions, 15 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 1af2c8c88..43a598839 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -66,11 +66,11 @@ object ItemDisplayOverlayFeatures {
private val config get() = SkyHanniMod.feature.inventory
private val patternGroup = RepoPattern.group("inventory.item.overlay")
- private val masterSkullPattern by patternGroup.pattern(
- "masterskull",
- "(.*)Master Skull - Tier .",
+ private val masterSkullIDPattern by patternGroup.pattern(
+ "masterskull.id",
+ "MASTER_SKULL_TIER_(?<tier>\\d)",
)
- private val gardenVacuumPatterm by patternGroup.pattern(
+ private val gardenVacuumPattern by patternGroup.pattern(
"vacuum",
"§7Vacuum Bag: §6(?<amount>\\d*) Pests?",
)
@@ -131,20 +131,20 @@ object ItemDisplayOverlayFeatures {
}
if (MASTER_SKULL_TIER.isSelected()) {
- masterSkullPattern.matchMatcher(itemName) {
- return itemName.substring(itemName.length - 1)
+ masterSkullIDPattern.matchMatcher(internalName.asString()) {
+ return group("tier")
}
}
- if (DUNGEON_HEAD_FLOOR_NUMBER.isSelected() && (itemName.contains("Golden ") || itemName.contains("Diamond "))) {
+ if (DUNGEON_HEAD_FLOOR_NUMBER.isSelected() && (internalName.contains("GOLD_") || internalName.contains("DIAMOND_"))) {
when {
- itemName.contains("Bonzo") -> return "1"
- itemName.contains("Scarf") -> return "2"
- itemName.contains("Professor") -> return "3"
- itemName.contains("Thorn") -> return "4"
- itemName.contains("Livid") -> return "5"
- itemName.contains("Sadan") -> return "6"
- itemName.contains("Necron") -> return "7"
+ internalName.contains("BONZO") -> return "1"
+ internalName.contains("SCARF") -> return "2"
+ internalName.contains("PROFESSOR") -> return "3"
+ internalName.contains("THORN") -> return "4"
+ internalName.contains("LIVID") -> return "5"
+ internalName.contains("SADAN") -> return "6"
+ internalName.contains("NECRON") -> return "7"
}
}
@@ -252,7 +252,7 @@ object ItemDisplayOverlayFeatures {
}
if (VACUUM_GARDEN.isSelected() && internalName in PestAPI.vacuumVariants && isOwnItem(lore)) {
- lore.matchFirst(gardenVacuumPatterm) {
+ lore.matchFirst(gardenVacuumPattern) {
val pests = group("amount").formatLong()
return if (config.vacuumBagCap) {
if (pests > 39) "§640+" else "$pests"