From 6502ab0e55bb0b1066efe60cb5059cbbb54d0b51 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 17 Apr 2024 17:40:05 +0200 Subject: code cleanup --- .../skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java') 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 } -- cgit