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 | 2fd2c32dfe0b33d91379adaff85d79657d37a6de (patch) | |
| tree | 1499a58bd47398a20f1ae3c0449b8673807cf24b | |
| parent | 4e519560cb42645cf48e9a9db9babc6f2aca6461 (diff) | |
| download | SkyHanni-2fd2c32dfe0b33d91379adaff85d79657d37a6de.tar.gz SkyHanni-2fd2c32dfe0b33d91379adaff85d79657d37a6de.tar.bz2 SkyHanni-2fd2c32dfe0b33d91379adaff85d79657d37a6de.zip | |
Mushroom Cow Perk 'Mushroom Eater' counts the extra mushrooms as money to your money/hour display
| -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) { |
