diff --git a/.devauth/config.toml b/.devauth/config.toml index 1cb744bd4464..4bca64127f9d 100644 --- a/.devauth/config.toml +++ b/.devauth/config.toml @@ -4,3 +4,6 @@ defaultAccount = "main" [accounts.main] type = "microsoft" +[accounts.alt] +type = "microsoft" + 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 a1cb92be0269..3242837b7fd4 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 @@ -19,6 +19,16 @@ public class FarmingFortuneConfig { @FeatureToggle public boolean display = false; + @Expose + @ConfigOption(name = "Compact Format", desc = "Compact the farming fortune display") + @ConfigEditorBoolean + public boolean compactFormat = false; + + @Expose + @ConfigOption(name = "Hide Missing Fortune Warnings", desc = "Hide missing fortune warnings from the display") + @ConfigEditorBoolean + public boolean hideMissingFortuneWarnings = false; + @ConfigOption(name = "Farming Fortune Guide", desc = "Open a guide that breaks down your Farming Fortune.\n§eCommand: /ff") @ConfigEditorButton(buttonText = "Open") public Runnable open = FFGuideGUI::onCommand; 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 0dc6ce28cf15..b9745306068a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt @@ -163,6 +163,7 @@ object FarmingFortuneDisplay { var recentlySwitchedTool = lastToolSwitch.passedSince() < 1.5.seconds val wrongTabCrop = GardenAPI.cropInHand != null && GardenAPI.cropInHand != currentCrop + val ffReduction = getPestFFReduction() val farmingFortune = if (wrongTabCrop) { (displayCrop.getLatestTrueFarmingFortune() ?: -1.0).also { @@ -172,28 +173,38 @@ object FarmingFortuneDisplay { list.add( Renderable.string( - "§6Farming Fortune§7: §e" + if (!recentlySwitchedTool && farmingFortune != -1.0) { + (if (config.compactFormat) "§6FF§7: " else "§6Farming Fortune§7: ") + (if (ffReduction > 0) "§c" else "§e") + + if (!recentlySwitchedTool && farmingFortune != -1.0) { farmingFortune.roundTo(0).addSeparators() } else "§7" + (displayCrop.getLatestTrueFarmingFortune()?.addSeparators() ?: "?"), ), ) add(Renderable.horizontalContainer(list)) - val ffReduction = getPestFFReduction() if (ffReduction > 0) { - add(Renderable.string("§cPests are reducing your fortune by §e$ffReduction%§c!")) + add(Renderable.string(if (config.compactFormat) "§cPests: §7-§e$ffReduction%" + else "§cPests are reducing your fortune by §e$ffReduction%§c!")) } - if (wrongTabCrop) { - var text = "§cBreak §e${GardenAPI.cropInHand?.cropName}§c to see" - if (farmingFortune != -1.0) text += " latest" - text += " fortune!" - + if (wrongTabCrop && !config.hideMissingFortuneWarnings) { + var text = "" + if (config.compactFormat) { + text = "§cInaccurate!" + } else { + text = "§cBreak §e${GardenAPI.cropInHand?.cropName}§c to see" + if (farmingFortune != -1.0) text += " latest" + text += " fortune!" + } add(Renderable.string(text)) } } private fun drawMissingFortuneDisplay(cropFortune: Boolean) = buildList { + if (config.hideMissingFortuneWarnings) return@buildList + if (config.compactFormat) { + add(Renderable.string("§cInaccurate!")) + return@buildList + } if (cropFortune) { add( Renderable.clickAndHover(