aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon <brandon.wamboldt@gmail.com>2023-09-23 08:30:22 -0300
committerGitHub <noreply@github.com>2023-09-23 13:30:22 +0200
commit9ff6418d5fc3c4c866cb98e31a9ff38d788d9f77 (patch)
tree2c1bb41f3629b40982eb312faf5fb8424d87efb2
parent159ed76251de5c7674956ebf153298f02f09477c (diff)
downloadskyhanni-9ff6418d5fc3c4c866cb98e31a9ff38d788d9f77.tar.gz
skyhanni-9ff6418d5fc3c4c866cb98e31a9ff38d788d9f77.tar.bz2
skyhanni-9ff6418d5fc3c4c866cb98e31a9ff38d788d9f77.zip
Fix: Dicer error when switching away from dicer during farmer (#481)
Co-authored-by: Brandon Wamboldt <brandon.wamboldt@maplewave.com>
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
index 31eea71e2..694006ea8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
@@ -16,6 +16,7 @@ import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed.getSpeed
import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed.isSpeedDataEmpty
import at.hannibal2.skyhanni.test.command.CopyErrorCommand
import at.hannibal2.skyhanni.utils.*
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getItemNameOrNull
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.LorenzUtils.moveEntryToTop
@@ -133,7 +134,7 @@ object CropMoneyDisplay {
extraMushroomCowPerkCoins = perSecond * 60 * 60
}
- if (InventoryUtils.itemInHandId.contains("DICER") && config.moneyPerHourDicer) {
+ if (InventoryUtils.getItemInHand()?.getInternalName()?.contains("DICER") == true && config.moneyPerHourDicer) {
val (dicerDrops, internalName) = when (it) {
CropType.MELON -> GardenCropSpeed.latestMelonDicer to "ENCHANTED_MELON".asInternalName()
CropType.PUMPKIN -> GardenCropSpeed.latestPumpkinDicer to "ENCHANTED_PUMPKIN".asInternalName()