diff options
author | Obsidian <108832807+Obsidianninja11@users.noreply.github.com> | 2024-07-06 01:57:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-06 08:57:28 +0200 |
commit | a30e2437c657bbecb8039e783ce4d164b1e08631 (patch) | |
tree | ed53c15e9d72f609e5b0773d07ba7caf382d696d /src/main/java/at/hannibal2 | |
parent | e6216643e5e85f8912f969a079f0100e3bd5cbf9 (diff) | |
download | skyhanni-a30e2437c657bbecb8039e783ce4d164b1e08631.tar.gz skyhanni-a30e2437c657bbecb8039e783ce4d164b1e08631.tar.bz2 skyhanni-a30e2437c657bbecb8039e783ce4d164b1e08631.zip |
Improvement + Fix: Unclaimed Eggs feature while busy (#2091)
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java | 10 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt | 7 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java index 0083b1343..de86e01c4 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java @@ -93,10 +93,16 @@ public class HoppityEggsConfig { public String warpDestination = "nucleus"; @Expose - @ConfigOption(name = "Show during Contest", desc = "Show during a farming contest.") + @ConfigOption(name = "Show While Busy", desc = "Show while \"busy\" (in a farming contest, doing Kuudra, in the rift, etc).") @ConfigEditorBoolean @FeatureToggle - public boolean showDuringContest = false; + public boolean showWhileBusy = false; + + @Expose + @ConfigOption(name = "Warn While Busy", desc = "Warn while \"busy\" (in a farming contest, doing Kuudra, in the rift, etc).") + @ConfigEditorBoolean + @FeatureToggle + public boolean warnWhileBusy = false; @Expose @ConfigOption(name = "Show Outside SkyBlock", desc = "Show on Hypixel even when not playing SkyBlock.") diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index bb3753c13..de37de625 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -199,7 +199,7 @@ object HoppityEggsManager { fun onRenderOverlay(event: GuiRenderEvent) { if (!isActive()) return if (!config.showClaimedEggs) return - if (isBusy()) return + if (isBusy() && !config.showWhileBusy) return val displayList = HoppityEggType.entries.map { "ยง7 - ${it.formattedName} ${it.timeUntil().format()}" }.toMutableList() @@ -253,7 +253,7 @@ object HoppityEggsManager { private fun warn() { if (!config.warnUnclaimedEggs) return - if (isBusy()) return + if (isBusy() && !config.warnWhileBusy) return if (lastWarnTime.passedSince() < 30.seconds) return lastWarnTime = now() @@ -278,7 +278,7 @@ object HoppityEggsManager { SoundUtils.repeatSound(100, 10, SoundUtils.plingSound) } - private fun isBusy() = ReminderUtils.isBusy(config.showDuringContest) + private fun isBusy() = ReminderUtils.isBusy() @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { @@ -288,6 +288,7 @@ object HoppityEggsManager { "event.chocolateFactory.hoppityEggs.highlightHoppityShop", ) event.move(44, "event.chocolateFactory.hoppityEggs", "event.hoppityEggs") + event.move(50, "event.hoppityEggs.showDuringContest", "event.hoppityEggs.showWhileBusy") } fun isActive() = (LorenzUtils.inSkyBlock || (LorenzUtils.onHypixel && config.showOutsideSkyblock)) && |