From 80f2a9dd281550145fca9e0e2bd6ef121f3c758f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 18 May 2023 11:12:08 +0200 Subject: Removed debug --- .../java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt index 04717a9a5..aa797add1 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt @@ -29,14 +29,9 @@ class GardenCropUpgrades { fun onInventoryOpen(event: InventoryOpenEvent) { if (event.inventoryName != "Crop Upgrades") return event.inventoryItems.forEach { (_, item) -> - val crop = item.name?.removeColor()?.let { - CropType.getByNameOrNull(it) - } ?: return@forEach - println("finding for '$crop'") - val level = item.getLore().firstNotNullOfOrNull { - tierPattern.matchEntire(it)?.groups?.get(1)?.value?.toIntOrNull() - } ?: 0 - println("found: $level") + val crop = item.name?.removeColor()?.let { CropType.getByNameOrNull(it) } ?: return@forEach + val level = item.getLore() + .firstNotNullOfOrNull { tierPattern.matchEntire(it)?.groups?.get(1)?.value?.toIntOrNull() } ?: 0 crop.setUpgradeLevel(level) } CropUpgradeUpdateEvent().postAndCatch() -- cgit