aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-17 17:40:05 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-17 17:40:05 +0200
commit6502ab0e55bb0b1066efe60cb5059cbbb54d0b51 (patch)
tree1b5a123442b13219cb578dacdc19766a9808129a /src/main/java/at/hannibal2
parent5f6e3814d63df9bc29905d62ffc40d1615408928 (diff)
downloadskyhanni-6502ab0e55bb0b1066efe60cb5059cbbb54d0b51.tar.gz
skyhanni-6502ab0e55bb0b1066efe60cb5059cbbb54d0b51.tar.bz2
skyhanni-6502ab0e55bb0b1066efe60cb5059cbbb54d0b51.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt4
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
}