From 522ccb4d14781ebbfe603d299986f85b95341107 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:18:21 +0200 Subject: Using NEUInternalName in CollectionStep --- .../at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt | 4 ++-- src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt index bfa081288..5cf45a49e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt @@ -1,9 +1,9 @@ package at.hannibal2.skyhanni.features.bingo.nextstep -import at.hannibal2.skyhanni.utils.NEUItems +import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NumberUtil class CollectionStep(collectionName: String, amountNeeded: Int) : ProgressionStep(NumberUtil.format(amountNeeded) + " $collectionName Collection", amountNeeded.toLong()) { - val internalName = NEUItems.getInternalName(collectionName) + val internalName by lazy { NEUInternalName.fromItemName(collectionName) } } \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index ce44e3d64..b706bfb68 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -47,11 +47,11 @@ object NEUItems { // TODO remove fun getRawInternalName(itemName: String): String { - return getInternalNameOrNull(itemName)?.asString() ?: throw Error("internal name is null for '$itemName'") + return getInternalNameFromItemName(itemName).asString() } - fun getInternalName(itemName: String): NEUInternalName { - return getInternalNameOrNull(itemName) ?: throw Error("getInternalName is null for '$itemName'") + fun getInternalNameFromItemName(itemName: String): NEUInternalName { + return getInternalNameOrNull(itemName) ?: throw Error("Internal name is null for '$itemName'") } fun getInternalNameOrNullIgnoreCase(itemName: String): NEUInternalName? { -- cgit