From 80a6728abdd34d80495bfd18f0250bbf59865a25 Mon Sep 17 00:00:00 2001 From: Kaeso <24925519+ptlthg@users.noreply.github.com> Date: Sun, 27 Aug 2023 16:32:00 -0400 Subject: Merge pull request #335 * Sync Jacob Contests --- src/main/java/at/hannibal2/skyhanni/config/Storage.java | 3 +++ .../java/at/hannibal2/skyhanni/config/commands/Commands.kt | 3 ++- .../at/hannibal2/skyhanni/config/features/GardenConfig.java | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/config') diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 79731f069..a2af0ed79 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -23,6 +23,9 @@ public class Storage { @Expose public Map> gardenJacobFarmingContestTimes = new HashMap<>(); + @Expose + public Boolean contestSendingAsked = false; + @Expose public Map players = new HashMap<>(); 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 118af32e7..0b4f8c6e9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.features.fame.AccountUpgradeReminder import at.hannibal2.skyhanni.features.fame.CityProjectFeatures import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.GardenCropTimeCommand +import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay import at.hannibal2.skyhanni.features.garden.farming.CropMoneyDisplay import at.hannibal2.skyhanni.features.garden.farming.CropSpeedMeter @@ -230,8 +231,8 @@ object Commands { registerCommand("shshareinquis", "") { InquisitorWaypointShare.sendInquisitor() } registerCommand("shcopyerror", "") { CopyErrorCommand.command(it) } registerCommand("shstopcityprojectreminder", "") { CityProjectFeatures.disable() } + registerCommand("shsendcontests", "") { GardenNextJacobContest.shareContestConfirmed(it) } registerCommand("shstopaccountupgradereminder", "") { AccountUpgradeReminder.disable() } - } private fun commandHelp(args: Array) { diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java index b3a5abd27..1d30c2998 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/GardenConfig.java @@ -937,6 +937,18 @@ public class GardenConfig { @ConfigAccordionId(id = 14) public boolean nextJacobContestOtherGuis = false; + @Expose + @ConfigOption(name = "Fetch Contests", desc = "Automatically fetch contests from elitebot.dev for the current year if they're uploaded already.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 14) + public boolean nextJacobContestsFetchAutomatically = true; + + @Expose + @ConfigOption(name = "Share Contests", desc = "Share the list of upcoming contests to elitebot.dev for everyone else to then fetch automatically.") + @ConfigEditorDropdown(values = { "Ask When Needed", "Share Automatically", "Disabled" }) + @ConfigAccordionId(id = 14) + public int nextJacobContestsShareAutomatically = 0; + @Expose @ConfigOption(name = "Warning", desc = "Show a warning shortly before a new Jacob's contest starts.") @ConfigEditorBoolean -- cgit