From 6ed818521cd2c9e97743881966632488e598c20e Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:01:12 +1100 Subject: Send Mining Island Events (#969) Added sending mining events to Soopy's API to test for new Mining Event feature. #969 --- .../hannibal2/skyhanni/config/commands/Commands.kt | 5 ++ .../config/features/mining/MiningConfig.java | 5 ++ .../config/features/mining/MiningEventConfig.java | 61 ++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningEventConfig.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 a2820fbfc..69b096b31 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -55,6 +55,7 @@ import at.hannibal2.skyhanni.test.SkyHanniConfigSearchResetCommand import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import at.hannibal2.skyhanni.test.TestBingo import at.hannibal2.skyhanni.test.WorldEdit +import at.hannibal2.skyhanni.test.command.CopyBossbarCommand import at.hannibal2.skyhanni.test.command.CopyItemCommand import at.hannibal2.skyhanni.test.command.CopyNearbyEntitiesCommand import at.hannibal2.skyhanni.test.command.CopyNearbyParticlesCommand @@ -355,6 +356,10 @@ object Commands { "shcopyscoreboard", "Copies the scoreboard data to the clipboard" ) { CopyScoreboardCommand.command(it) } + registerCommand( + "shcopybossbar", + "Copies the name of the bossbar to the clipboard, including formatting codes" + ) { CopyBossbarCommand.command(it) } registerCommand( "shcopyitem", "Copies information about the item in hand to the clipboard" diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java index 462908f6e..9b385494b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java @@ -3,11 +3,16 @@ package at.hannibal2.skyhanni.config.features.mining; import at.hannibal2.skyhanni.config.FeatureToggle; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigOption; public class MiningConfig { + @Expose + @Category(name = "Mining Event Tracker", desc = "Settings for the Mining Event Tracker") + public MiningEventConfig miningEvent = new MiningEventConfig(); + @Expose @ConfigOption(name = "Powder Tracker", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningEventConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningEventConfig.java new file mode 100644 index 000000000..261283c7b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningEventConfig.java @@ -0,0 +1,61 @@ +package at.hannibal2.skyhanni.config.features.mining; + +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 MiningEventConfig { + +// @Expose +// @ConfigOption(name = "Enabled", desc = "Show information about upcoming Dwarven Mines and Crystal Hollows mining events, also enables you sending data.") +// @ConfigEditorBoolean +// @FeatureToggle +// public boolean enabled = true; +// +// @Expose +// @ConfigOption(name = "Show Outside Mining Islands", desc = "Shows the event tracker when you are not inside of the Dwarven Mines or Crystal Hollows.") +// @ConfigEditorBoolean +// public boolean outsideMining = true; +// +// @Expose +// @ConfigOption(name = "What to Show", desc = "Choose which island's events are shown in the gui.") +// @ConfigEditorDropdown +// public ShowType showType = ShowType.BOTH; +// +// @Expose +// @ConfigOption(name = "Show Warnings For Events", desc = "Shows the warnings when select mining events are about to start.") +// @ConfigEditorBoolean +// @FeatureToggle +// public boolean showWarnings = false; + + //todo remove when released + @Expose + @ConfigOption(name = "Send Test data", desc = "Sends test data to make sure the api works.") + @ConfigEditorBoolean + @FeatureToggle + public boolean sendData = true; + +// @Expose +// @ConfigOption(name = "Events to Warn for", desc = "Choose which mining events you get warned about.") +// @ConfigEditorDraggableList +// public List eventsToWarn = new ArrayList<>(Collections.singletonList(MiningEvent.DOUBLE_POWDER)); + + public enum ShowType { + BOTH("Both Mining Islands"), + CRYSTAL("Crystal Hollows Only"), + DWARVEN("Dwarven Mines Only") + ; + + private final String str; + + ShowType(String str) { + this.str = str; + } + + @Override + public String toString() { + return str; + } + } +} -- cgit