diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-07 20:03:21 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-07 20:03:21 +0100 |
commit | f617d5f7152de8dbad0692fa7ddf15c4a0cea86b (patch) | |
tree | 74e6df91c2e9313d7b408b16c684aa54f62be4e4 /src/main/java/at/hannibal2 | |
parent | a4e15a525d7c31c532a28cb8132a68c01202a9b5 (diff) | |
download | skyhanni-f617d5f7152de8dbad0692fa7ddf15c4a0cea86b.tar.gz skyhanni-f617d5f7152de8dbad0692fa7ddf15c4a0cea86b.tar.bz2 skyhanni-f617d5f7152de8dbad0692fa7ddf15c4a0cea86b.zip |
Moving minion craft helper fully over to neu internal names.
Diffstat (limited to 'src/main/java/at/hannibal2')
3 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 2678f0259..6e899692c 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -106,7 +106,7 @@ public class Storage { public static class BingoSession { @Expose - public List<String> tierOneMinionsDone = new ArrayList<>(); + public List<NEUInternalName> tierOneMinionsDone = new ArrayList<>(); @Expose public Map<Integer, BingoGoal> goals = new HashMap<>(); diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/FirstMinionTier.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/FirstMinionTier.kt index 043089861..f7366235c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/FirstMinionTier.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/FirstMinionTier.kt @@ -14,7 +14,7 @@ object FirstMinionTier { otherItems: Map<NEUInternalName, Int>, minions: MutableMap<String, NEUInternalName>, tierOneMinions: MutableList<NEUInternalName>, - tierOneMinionsDone: MutableList<String>, + tierOneMinionsDone: MutableList<NEUInternalName>, ) { val help = helpMap(otherItems) val tierOneMinionsFiltered = getTierOneMinionsFiltered(tierOneMinions, tierOneMinionsDone) @@ -51,20 +51,20 @@ object FirstMinionTier { private fun addMinion( tierOneMinionsFiltered: List<NEUInternalName>, minions: MutableMap<String, NEUInternalName>, - tierOneMinionsDone: MutableList<String> + tierOneMinionsDone: MutableList<NEUInternalName> ) { for (minionId in tierOneMinionsFiltered) { val prefix = minionId.asString().dropLast(1) if (minions.any { it.value.startsWith(prefix) }) { - tierOneMinionsDone.add(minionId.asString()) + tierOneMinionsDone.add(minionId) } } } private fun getTierOneMinionsFiltered( tierOneMinions: MutableList<NEUInternalName>, - tierOneMinionsDone: MutableList<String> - ) = tierOneMinions.filter { it.asString() !in tierOneMinionsDone } + tierOneMinionsDone: MutableList<NEUInternalName> + ) = tierOneMinions.filter { it !in tierOneMinionsDone } private fun helpMap(otherItems: Map<NEUInternalName, Int>) = otherItems.filter { !it.key.startsWith("WOOD_") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt index 227c4fd58..bfcb24501 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt @@ -258,7 +258,7 @@ class MinionCraftHelper { for ((_, b) in event.inventoryItems) { val name = b.name ?: continue if (!name.startsWith("§e")) continue - val internalName = NEUItems.getRawInternalName("$name I") + val internalName = NEUItems.getInternalNameFromItemName("$name I") .replace("MINION", "GENERATOR").replace(";", "_").replace("CAVE_SPIDER", "CAVESPIDER") if (!tierOneMinionsDone.contains(internalName)) { tierOneMinionsDone.add(internalName) |