From 96c657cbb5e1c9282911bb8b7b6f6239392ae07f Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Mon, 19 Feb 2024 15:40:02 +0100 Subject: Added GetFromSackAPI. #968 --- .../hannibal2/skyhanni/config/commands/Commands.kt | 39 +++++++++------------- .../features/inventory/GetFromSackConfig.java | 20 +++++++++++ .../config/features/inventory/InventoryConfig.java | 6 +++- 3 files changed, 41 insertions(+), 24 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/GetFromSackConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config') 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 3a0290b6a..5283c0c6e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -14,7 +14,6 @@ import at.hannibal2.skyhanni.features.chat.Translator import at.hannibal2.skyhanni.features.combat.endernodetracker.EnderNodeTracker import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil import at.hannibal2.skyhanni.features.commands.PartyCommands -import at.hannibal2.skyhanni.features.commands.WikiManager import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper import at.hannibal2.skyhanni.features.event.diana.DianaProfitTracker import at.hannibal2.skyhanni.features.event.diana.GriffinBurrowHelper @@ -240,28 +239,22 @@ object Commands { "shresetseacreaturetracker", "Resets the Sea Creature Tracker" ) { SeaCreatureTracker.resetCommand(it) } - registerCommand( - "shfandomwiki", - "Searches the fandom wiki with SkyHanni's own method." - ) {WikiManager.otherWikiCommands(it, true)} - registerCommand( - "shfandomwikithis", - "Searches the fandom wiki with SkyHanni's own method." - ) {WikiManager.otherWikiCommands(it, true, true)} - registerCommand( - "shofficialwiki", - "Searches the official wiki with SkyHanni's own method." - ) {WikiManager.otherWikiCommands(it, false)} - registerCommand( - "shofficialwikithis", - "Searches the official wiki with SkyHanni's own method." - ) {WikiManager.otherWikiCommands(it, false, true)} - registerCommand0("shcalccrop", "Calculate how many crops need to be farmed between different crop milestones.", { - FarmingMilestoneCommand.onCommand(it.getOrNull(0), it.getOrNull(1), it.getOrNull(2), false) - }, FarmingMilestoneCommand::onComplete) - registerCommand0("shcalccroptime", "Calculate how long you need to farm crops between different crop milestones.", { - FarmingMilestoneCommand.onCommand(it.getOrNull(0), it.getOrNull(1), it.getOrNull(2), true) - }, FarmingMilestoneCommand::onComplete) + registerCommand0( + "shcalccrop", + "Calculate how many crops need to be farmed between different crop milestones.", + { + FarmingMilestoneCommand.onCommand(it.getOrNull(0), it.getOrNull(1), it.getOrNull(2), false) + }, + FarmingMilestoneCommand::onComplete + ) + registerCommand0( + "shcalccroptime", + "Calculate how long you need to farm crops between different crop milestones.", + { + FarmingMilestoneCommand.onCommand(it.getOrNull(0), it.getOrNull(1), it.getOrNull(2), true) + }, + FarmingMilestoneCommand::onComplete + ) } private fun usersBugFix() { diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/GetFromSackConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/GetFromSackConfig.java new file mode 100644 index 000000000..9454bd3fe --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/GetFromSackConfig.java @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class GetFromSackConfig { + + @Expose + @ConfigOption(name = "Queued GfS", desc = "If §e/gfs §for §e/getfromsacks §fis used it queues up the commands so all items are guarantied to be received.") + @ConfigEditorBoolean + @FeatureToggle + public boolean queuedGFS = true; + + @Expose + @ConfigOption(name = "Bazaar GfS", desc = "If you don't have enough items in sack get a prompt to buy them from bazaar.") + @ConfigEditorBoolean + public boolean bazaarGFS = false; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index 9e7a88e9d..ce60c05ff 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -56,6 +56,11 @@ public class InventoryConfig { @Category(name = "Helpers", desc = "Settings for Helpers") public HelperConfig helper = new HelperConfig(); + @Expose + @ConfigOption(name = "Get From Sack", desc = "") + @Accordion + public GetFromSackConfig gfs = new GetFromSackConfig(); + @Expose @ConfigOption( name = "Item Number", @@ -200,5 +205,4 @@ public class InventoryConfig { @ConfigEditorBoolean @FeatureToggle public boolean shiftClickBrewing = false; - } -- cgit