diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-18 11:12:08 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-18 11:12:08 +0200 |
commit | 80f2a9dd281550145fca9e0e2bd6ef121f3c758f (patch) | |
tree | ea466c2b1f652440b53e353c26c6f69b6aec71fe /src/main | |
parent | 10e548fda6d90dd03cce0ee4baa8dc35331c2460 (diff) | |
download | skyhanni-80f2a9dd281550145fca9e0e2bd6ef121f3c758f.tar.gz skyhanni-80f2a9dd281550145fca9e0e2bd6ef121f3c758f.tar.bz2 skyhanni-80f2a9dd281550145fca9e0e2bd6ef121f3c758f.zip |
Removed debug
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt | 11 |
1 files changed, 3 insertions, 8 deletions
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() |