diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 676c1f492..50779ac60 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -118,8 +118,7 @@ object GardenVisitorFeatures { if (line == "ยง7Items Required:") continue if (line.isEmpty()) break - val pair = ItemUtils.readItemAmount(line) - if (pair == null) { + val (itemName, amount) = ItemUtils.readItemAmount(line) ?: run { ErrorManager.logErrorStateWithData( "Could not read Shopping List in Visitor Inventory", "ItemUtils.readItemAmount returns null", "line" to line, @@ -129,7 +128,6 @@ object GardenVisitorFeatures { ) continue } - val (itemName, amount) = pair val internalName = NEUInternalName.fromItemName(itemName) visitor.shoppingList[internalName] = amount } |