aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-04-27 11:42:31 +0200
committerGitHub <noreply@github.com>2024-04-27 11:42:31 +0200
commit17c00e7ed2fee95819f49a421690d4382ee28cc1 (patch)
tree329815dfa66833bd94a6443c43ef93fd47c3fcca /src/main/java/at/hannibal2/skyhanni/utils
parentb1ca6d79a772f5cb6abb7aab8575b36705d75911 (diff)
downloadskyhanni-17c00e7ed2fee95819f49a421690d4382ee28cc1.tar.gz
skyhanni-17c00e7ed2fee95819f49a421690d4382ee28cc1.tar.bz2
skyhanni-17c00e7ed2fee95819f49a421690d4382ee28cc1.zip
Fix: Super Craft GFS with Pet (#1553)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUInternalName.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUInternalName.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUInternalName.kt
index ab71a7e2e..b3605094a 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUInternalName.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUInternalName.kt
@@ -19,7 +19,8 @@ class NEUInternalName private constructor(private val internalName: String) {
return map.getOrPut(internalName) { NEUInternalName(internalName) }
}
- fun fromItemNameOrNull(itemName: String): NEUInternalName? = ItemNameResolver.getInternalNameOrNull(itemName)
+ fun fromItemNameOrNull(itemName: String): NEUInternalName? =
+ ItemNameResolver.getInternalNameOrNull(itemName.removeSuffix(" Pet"))
fun fromItemName(itemName: String): NEUInternalName =
fromItemNameOrNull(itemName) ?: ErrorManager.skyHanniError(
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index 7c11f03db..f379ea2f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -125,7 +125,8 @@ object NEUItems {
for (rawInternalName in allNeuRepoItems().keys) {
val name = manager.createItem(rawInternalName).displayName.removeColor().lowercase()
val internalName = rawInternalName.asInternalName()
- map[name] = internalName
+ val storedName = name.removePrefix("[lvl 1➡100] ")
+ map[storedName] = internalName
allInternalNames.add(internalName)
}
return map