diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-21 19:09:17 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-21 19:09:17 +0100 |
commit | 6965c72c60ed68ee2fea4b0249f1cec463c4ac8b (patch) | |
tree | 99385dcfedec0a99b64a8af1d60b4b9c6567a958 /src/main/java | |
parent | 31f65742ccca74a6afec114ee289f72b53b2682e (diff) | |
download | skyhanni-6965c72c60ed68ee2fea4b0249f1cec463c4ac8b.tar.gz skyhanni-6965c72c60ed68ee2fea4b0249f1cec463c4ac8b.tar.bz2 skyhanni-6965c72c60ed68ee2fea4b0249f1cec463c4ac8b.zip |
Removed 100 Farming Fortune from "Show As Drop Multiplier" from all displays (also known as "base ff").
Diffstat (limited to 'src/main/java')
4 files changed, 12 insertions, 34 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingFortuneConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingFortuneConfig.java index aadf97fee..ff5f6c62d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingFortuneConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/FarmingFortuneConfig.java @@ -18,15 +18,6 @@ public class FarmingFortuneConfig { @FeatureToggle public boolean display = true; - @Expose - @ConfigOption( - name = "Show As Drop Multiplier", - desc = "Adds 100 to the displayed Farming Fortune so that it represents a drop multiplier rather than" + - " the chance for bonus drops. " - ) - @ConfigEditorBoolean - public boolean dropMultiplier = true; - @ConfigOption(name = "Farming Fortune Guide", desc = "Opens a guide that breaks down your Farming Fortune.\n§eCommand: /ff") @ConfigEditorButton(buttonText = "Open") public Runnable open = Commands::openFortuneGuide; diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt index ac48b1ec2..982ff7bc1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt @@ -102,9 +102,7 @@ class FarmingFortuneDisplay { wrongTabCrop = GardenAPI.cropInHand != null && GardenAPI.cropInHand != currentCrop if (wrongTabCrop) { - farmingFortune = displayCrop.getLatestTrueFarmingFortune()?.let { - if (config.dropMultiplier) it else it - 100.0 - } ?: -1.0 + farmingFortune = displayCrop.getLatestTrueFarmingFortune() ?: -1.0 recentlySwitchedTool = false } else { farmingFortune = getCurrentFarmingFortune() @@ -118,7 +116,7 @@ class FarmingFortuneDisplay { if (GardenAPI.cropInHand == currentCrop) { if (!recentlySwitchedTool) { - latestFF?.put(currentCrop, getCurrentFarmingFortune(true)) + latestFF?.put(currentCrop, getCurrentFarmingFortune()) } } }) @@ -156,7 +154,6 @@ class FarmingFortuneDisplay { private var tabFortuneUniversal: Double = 0.0 private var tabFortuneCrop: Double = 0.0 - private val baseFortune: Double get() = if (config.dropMultiplier) 100.0 else 0.0 private val upgradeFortune: Double? get() = currentCrop?.getUpgradeLevel()?.let { it * 5.0 } private val accessoryFortune: Double? get() = currentCrop?.let { @@ -269,9 +266,8 @@ class FarmingFortuneDisplay { } } - fun getCurrentFarmingFortune(alwaysBaseFortune: Boolean = false): Double { - val baseFortune = if (alwaysBaseFortune) 100.0 else baseFortune - return baseFortune + tabFortuneUniversal + tabFortuneCrop + fun getCurrentFarmingFortune(): Double { + return tabFortuneUniversal + tabFortuneCrop } fun CropType.getLatestTrueFarmingFortune() = latestFF?.get(this) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt index bcdc6b216..ec3284ef0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestFFNeededDisplay.kt @@ -96,25 +96,16 @@ class JacobContestFFNeededDisplay { add(listOf("§6Your ", crop.icon, "§6FF: $farmingFortune")) } addAsSingletonList("") - if (blocksPerSecond == null || trueFF == null) { - add(listOf("§cMissing data from above!")) - } else { - val predictedScore = (trueFF * blocksPerSecond * crop.baseDrops * 20 * 60 / 100).toInt().addSeparators() - add(listOf("§6Predicted ", crop.icon, "§6crops: $predictedScore")) - } - } - - private fun formatFarmingFortune(farmingFortune: Double): String { - var ff = farmingFortune - if (!config.farmingFortunes.dropMultiplier) { - ff -= 100 - if (ff < 100) { - ff = 0.0 - } + if (blocksPerSecond == null || trueFF == null) { + add(listOf("§cMissing data from above!")) + } else { + val predictedScore = (trueFF * blocksPerSecond * crop.baseDrops * 20 * 60 / 100).toInt().addSeparators() + add(listOf("§6Predicted ", crop.icon, "§6crops: $predictedScore")) } - return ceil(ff).addSeparators() } + private fun formatFarmingFortune(farmingFortune: Double) = ceil(farmingFortune).addSeparators() + private fun getLine(bracket: ContestBracket, map: Map<ContestBracket, Int>, crop: CropType): String { val counter = map[bracket] ?: return " ${bracket.displayName}§f: §8Not found!" val blocksPerSecond = crop.getRealBlocksPerSecond() 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 dae3e129f..781af77e8 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 @@ -165,7 +165,7 @@ object GardenCropMilestoneDisplay { Collections.singletonList("§e$haveFormat§8/§e$needFormat") } - val farmingFortune = FarmingFortuneDisplay.getCurrentFarmingFortune(true) + val farmingFortune = FarmingFortuneDisplay.getCurrentFarmingFortune() val speed = GardenCropSpeed.averageBlocksPerSecond val farmingFortuneSpeed = (farmingFortune * crop.baseDrops * speed / 100).round(1).toInt() |