aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-19 23:47:02 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-19 23:47:02 +0200
commit1e52428d3939d0b579cbc156b4e30fb4e8cdc342 (patch)
tree0a2aa3b81a5034654a7a135975d830606eb79641 /src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
parent50dfb62bad66e9bdb04cca17a2dd32a69b108265 (diff)
downloadskyhanni-1e52428d3939d0b579cbc156b4e30fb4e8cdc342.tar.gz
skyhanni-1e52428d3939d0b579cbc156b4e30fb4e8cdc342.tar.bz2
skyhanni-1e52428d3939d0b579cbc156b4e30fb4e8cdc342.zip
Code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
index 21c35837c..07b796b33 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt
@@ -29,7 +29,7 @@ class GardenCropUpgrades {
if (event.inventoryName != "Crop Upgrades") return
event.inventoryItems.forEach { (_, item) ->
val crop = item.name?.removeColor()?.let {
- CropType.getByName(it)
+ CropType.getByNameOrNull(it)
} ?: return@forEach
val level = item.getLore().firstNotNullOfOrNull {
tierPattern.matchEntire(it)?.groups?.get(1)?.value?.toIntOrNull()