From 04902842650833239d6488b1e1c3efb34b75811d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 9 Apr 2024 18:21:26 +0200 Subject: Updated /ff (#1392) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../hannibal2/skyhanni/config/commands/Commands.kt | 3 +- .../features/garden/fortuneguide/FFGuideGUI.kt | 46 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 1e1cc0da3..76f64a3a4 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -553,8 +553,7 @@ object Commands { if (!LorenzUtils.inSkyBlock) { ChatUtils.userError("Join SkyBlock to open the fortune guide!") } else { - CaptureFarmingGear.captureFarmingGear() - SkyHanniMod.screenToOpen = FFGuideGUI() + FFGuideGUI.open() } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt index c5f6da249..344e24466 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt @@ -1,12 +1,16 @@ package at.hannibal2.skyhanni.features.garden.fortuneguide +import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.fortuneguide.pages.CropPage import at.hannibal2.skyhanni.features.garden.fortuneguide.pages.OverviewPage import at.hannibal2.skyhanni.features.garden.fortuneguide.pages.UpgradePage +import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.GuiRenderUtils import at.hannibal2.skyhanni.utils.ItemUtils.name +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.SoundUtils import net.minecraft.client.Minecraft import net.minecraft.client.gui.GuiScreen @@ -20,6 +24,48 @@ import java.io.IOException open class FFGuideGUI : GuiScreen() { companion object { + private var firefoxTrials = 0 + + fun open() { + if (LorenzUtils.isAprilFoolsDay) { + when (firefoxTrials) { + 0 -> { + ChatUtils.chat("Are you looking for the FF browser?", prefix = false) + } + + 1 -> { + ChatUtils.chat("Quickly, download Firefox! NOW!", prefix = false) + OSUtils.openBrowser("https://www.mozilla.org/en-US/firefox/new/") + } + + 2 -> { + ChatUtils.chat("Have you tried Firefix from Mozilla already?", prefix = false) + } + + 10 -> { + ChatUtils.chat("Firefox is simply the best!", prefix = false) + } + + 20 -> { + ChatUtils.chat("What do you mean with \"farming fortune\"? This is a web browser!", prefix = false) + } + + 30 -> { + ChatUtils.chat("What are you still doing here? get Firefox!", prefix = false) + } + + else -> { + CaptureFarmingGear.captureFarmingGear() + SkyHanniMod.screenToOpen = FFGuideGUI() + } + } + firefoxTrials++ + } else { + CaptureFarmingGear.captureFarmingGear() + SkyHanniMod.screenToOpen = FFGuideGUI() + } + } + val pages = mutableMapOf() var guiLeft = 0 -- cgit