aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUInternalName.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt3
3 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt
index 9a8a0ba9e..9d3f92104 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt
@@ -23,7 +23,7 @@ class SuperCraftFeatures {
fun onChat(event: LorenzChatEvent) {
if (!config.superCraftGFS) return
val (internalName, amount) = craftedPattern.matchMatcher(event.message) {
- NEUInternalName.fromItemName(this.group("item")) to (this.group("amount")?.formatInt() ?: 1)
+ NEUInternalName.fromItemName(group("item")) to (group("amount")?.formatInt() ?: 1)
} ?: return
if (!SackAPI.sackListInternalNames.contains(internalName.asString())) return
DelayedRun.runNextTick {
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