diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-16 02:18:43 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-16 02:18:43 +0200 |
commit | cb0fc44d95a22523cc4423b64a88046899ec9350 (patch) | |
tree | 1499a58bd47398a20f1ae3c0449b8673807cf24b /src/main/java/at/hannibal2/skyhanni | |
parent | fa7360b6923ca8e4edea5c788cb38a3b941a6e12 (diff) | |
download | skyhanni-cb0fc44d95a22523cc4423b64a88046899ec9350.tar.gz skyhanni-cb0fc44d95a22523cc4423b64a88046899ec9350.tar.bz2 skyhanni-cb0fc44d95a22523cc4423b64a88046899ec9350.zip |
Mushroom Cow Perk 'Mushroom Eater' counts the extra mushrooms as money to your money/hour display
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt | 13 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt | 4 |
2 files changed, 15 insertions, 2 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 d9e9dd7c8..1c0ab2b47 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 @@ -88,11 +88,22 @@ class CropMoneyDisplay { return newDisplay } + var extraNetherWartPrices = 0.0 GardenAPI.cropInHand?.let { val heldItem = Minecraft.getMinecraft().thePlayer.heldItem val reforgeName = heldItem.getReforgeName() val bountiful = reforgeName == "bountiful" toolHasBountiful[it] = bountiful + + if (GardenAPI.mushroomCowPet && it != CropType.MUSHROOM) { + if (!GardenCropMilestoneDisplay.mushroom_cow_nether_warts || it != CropType.NETHER_WART) { + val redPrice = NEUItems.getPrice("ENCHANTED_RED_MUSHROOM") / 160 + val brownPrice = NEUItems.getPrice("ENCHANTED_BROWN_MUSHROOM") / 160 + val mushroomPrice = (redPrice + brownPrice) / 2 + val perSecond = 20.0 * it.multiplier * mushroomPrice + extraNetherWartPrices = perSecond * 60 * 60 + } + } } val moneyPerHourData = calculateMoneyPerHour() @@ -148,7 +159,7 @@ class CropMoneyDisplay { val moneyArray = moneyPerHourData[internalName]!! for (price in moneyArray) { - val format = format(price) + val format = format(price + extraNetherWartPrices) list.add("$coinsColor$format") list.add("ยง7/") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt index 92b27e094..d40c7e21c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropMilestoneDisplay.kt @@ -38,7 +38,9 @@ class GardenCropMilestoneDisplay { private var needsInventory = false - private var mushroom_cow_nether_warts = true + companion object { + var mushroom_cow_nether_warts = true + } @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { |