From 25655d0c66e1ef193fe17a173f42ff82d26111f9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 26 Nov 2023 07:59:13 +0100 Subject: Added pest spawn and pest timer features. --- .../config/features/garden/GardenConfig.java | 5 ++++ .../features/garden/pests/PestSpawnConfig.java | 33 ++++++++++++++++++++++ .../features/garden/pests/PestTimerConfig.java | 30 ++++++++++++++++++++ .../config/features/garden/pests/PestsConfig.java | 18 ++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestSpawnConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestTimerConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestsConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java index 7553f2f2a..13269ad57 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/GardenConfig.java @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.core.config.Position; import at.hannibal2.skyhanni.config.features.garden.composter.ComposterConfig; import at.hannibal2.skyhanni.config.features.garden.cropmilestones.CropMilestonesConfig; import at.hannibal2.skyhanni.config.features.garden.optimalspeed.OptimalSpeedConfig; +import at.hannibal2.skyhanni.config.features.garden.pests.PestsConfig; import at.hannibal2.skyhanni.config.features.garden.visitor.VisitorConfig; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; @@ -83,6 +84,10 @@ public class GardenConfig { @Category(name = "Composter", desc = "Composter Settings") public ComposterConfig composters = new ComposterConfig(); + @Expose + @Category(name = "Pests", desc = "Pests Settings") + public PestsConfig pests = new PestsConfig(); + @Expose @ConfigOption(name = "Farming Fortune Display", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestSpawnConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestSpawnConfig.java new file mode 100644 index 000000000..ac91fbe5b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestSpawnConfig.java @@ -0,0 +1,33 @@ +package at.hannibal2.skyhanni.config.features.garden.pests; + +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.ConfigEditorDropdown; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class PestSpawnConfig { + + @Expose + @ConfigOption( + name = "Chat Message Format", + desc = "Change how the pest spawn chat message should be formatted.") + @ConfigEditorDropdown(values = {"Hypixel Style", "Compact", "Disabled"}) + public int chatMessageFormat = 0; + + @Expose + @ConfigOption( + name = "Show Title", + desc = "Show a Title when a pest spawns." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean showTitle = true; + + @Expose + @ConfigOption(name = "Teleport Hotkey", desc = "Press this key to warp to the plot where the last pest has spawned.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int teleportHotkey = Keyboard.KEY_NONE; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestTimerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestTimerConfig.java new file mode 100644 index 000000000..a0e01a926 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestTimerConfig.java @@ -0,0 +1,30 @@ +package at.hannibal2.skyhanni.config.features.garden.pests; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PestTimerConfig { + + @Expose + @ConfigOption( + name = "Enabled", + desc = "Show the time since the last pest spawned on your garden." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Only With Vacuum", + desc = "Only show the time while holding vacuum in the hand." + ) + @ConfigEditorBoolean + public boolean onlyWithVacuum = false; + + @Expose + public Position position = new Position(390, 65, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestsConfig.java new file mode 100644 index 000000000..7acde7b64 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestsConfig.java @@ -0,0 +1,18 @@ +package at.hannibal2.skyhanni.config.features.garden.pests; + +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class PestsConfig { + + @Expose + @ConfigOption(name = "Pest Spawn", desc = "") + @Accordion + public PestSpawnConfig pestSpawn = new PestSpawnConfig(); + + @Expose + @ConfigOption(name = "Pest Timer", desc = "") + @Accordion + public PestTimerConfig pestTimer = new PestTimerConfig(); +} -- cgit