diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-10 10:18:21 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-10 10:18:21 +0200 |
commit | 522ccb4d14781ebbfe603d299986f85b95341107 (patch) | |
tree | 40dbec6c3e71ac8b9ac674a6368179e644b2c99d | |
parent | d40e9d24671af36cf6a3fb830a0d0c37dade8b4a (diff) | |
download | skyhanni-522ccb4d14781ebbfe603d299986f85b95341107.tar.gz skyhanni-522ccb4d14781ebbfe603d299986f85b95341107.tar.bz2 skyhanni-522ccb4d14781ebbfe603d299986f85b95341107.zip |
Using NEUInternalName in CollectionStep
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CollectionStep.kt | 4 | ||||
-rw-r--r-- | 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? { |