From dbd3a57152337fd28ae4aab8ac86460a46c6d90d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 4 May 2024 03:53:53 +0200 Subject: Improvement: Show during contest (#1670) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java | 6 ++++++ .../hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt | 2 +- src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt | 4 ++-- 3 files changed, 9 insertions(+), 3 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 c96002c6f..a7aaa31a6 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 @@ -28,6 +28,12 @@ public class HoppityEggsConfig { @FeatureToggle public boolean showClaimedEggs = false; + @Expose + @ConfigOption(name = "Show during Contest", desc = "Show during a farming contest.") + @ConfigEditorBoolean + @FeatureToggle + public boolean showDuringContest = false; + @Expose @ConfigOption(name = "Shared Hoppity Waypoints", desc = "Enable being able to share and receive egg waypoints in your lobby.") @ConfigEditorBoolean 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 8ed60d670..5ebe075bc 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 @@ -132,7 +132,7 @@ object HoppityEggsManager { fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.showClaimedEggs) return - if (ReminderUtils.isBusy()) return + if (ReminderUtils.isBusy(config.showDuringContest)) return if (!ChocolateFactoryAPI.isHoppityEvent()) return val displayList = HoppityEggType.entries diff --git a/src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt b/src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt index 4c4599396..bf6350337 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland object ReminderUtils { // TODO: add arachne fight, add slayer boss spawned, add dragon fight - fun isBusy(): Boolean = - DungeonAPI.inDungeon() || LorenzUtils.inKuudraFight || FarmingContestAPI.inContest || + fun isBusy(ignoreFarmingContest: Boolean = false): Boolean = + DungeonAPI.inDungeon() || LorenzUtils.inKuudraFight || (FarmingContestAPI.inContest && !ignoreFarmingContest) || RiftAPI.inRift() || IslandType.DARK_AUCTION.isInIsland() } -- cgit