diff options
| author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-04-13 08:35:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 08:35:51 +0200 |
| commit | 0d41a281c8d87128a0004fed96dada8b1b5e950a (patch) | |
| tree | 1f4492d4dfb646178c3e7409e519abaea5543efd /src/main/java/at/hannibal2/skyhanni/config/features | |
| parent | 2d3368725ea962d8ff42d17cf1623a2229da7b4f (diff) | |
| download | skyhanni-0d41a281c8d87128a0004fed96dada8b1b5e950a.tar.gz skyhanni-0d41a281c8d87128a0004fed96dada8b1b5e950a.tar.bz2 skyhanni-0d41a281c8d87128a0004fed96dada8b1b5e950a.zip | |
Feature: Quiver Display (#1190)
Co-authored-by: Cal <cwolfson58@gmail.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config/features')
5 files changed, 96 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java index a05ac751b..0504a918d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/CombatConfig.java @@ -20,6 +20,11 @@ public class CombatConfig { public GhostCounterConfig ghostCounter = new GhostCounterConfig(); @Expose + @ConfigOption(name = "Quiver", desc = "") + @Accordion + public QuiverConfig quiverConfig = new QuiverConfig(); + + @Expose @ConfigOption(name = "Summonings", desc = "") @Accordion public SummoningsConfig summonings = new SummoningsConfig(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/QuiverConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/QuiverConfig.java new file mode 100644 index 000000000..174af713b --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/QuiverConfig.java @@ -0,0 +1,40 @@ +package at.hannibal2.skyhanni.config.features.combat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.Accordion; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +public class QuiverConfig { + @Expose + @ConfigOption(name = "Quiver Display", desc = "") + @Accordion + public QuiverDisplayConfig quiverDisplay = new QuiverDisplayConfig(); + + @Expose + @ConfigOption( + name = "Low Quiver Alert", + desc = "Notifies you when your quiver\n" + + "reaches an amount of arrows." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean lowQuiverNotification = true; + + @Expose + @ConfigOption( + name = "Reminder After Run", + desc = "Reminds you to buy arrows after\n" + + "a Dungeons/Kuudra run if you're low." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean reminderAfterRun = true; + + @Expose + @ConfigOption(name = "Low Quiver Amount", desc = "Amount at which to notify you.") + @ConfigEditorSlider(minValue = 50, maxValue = 500, minStep = 50) + public int lowQuiverAmount = 100; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/QuiverDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/QuiverDisplayConfig.java new file mode 100644 index 000000000..626c73f99 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/QuiverDisplayConfig.java @@ -0,0 +1,51 @@ +package at.hannibal2.skyhanni.config.features.combat; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; + +public class QuiverDisplayConfig { + @Expose + @ConfigOption(name = "Enable", desc = "Show the number of arrows you have.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + public Position quiverDisplayPos = new Position(260, 80); + + @Expose + @ConfigOption(name = "Show arrow icon", desc = "Displays an icon next to the Quiver Display.") + @ConfigEditorBoolean + public Property<Boolean> showIcon = Property.of(true); + + @Expose + @ConfigOption( + name = "When to show", + desc = "Decides in what conditions to show the display." + ) + @ConfigEditorDropdown + public Property<ShowWhen> whenToShow = Property.of(ShowWhen.ONLY_BOW_HAND); + + public enum ShowWhen { + ALWAYS("Always"), + ONLY_BOW_INVENTORY("Bow in inventory"), + ONLY_BOW_HAND("Bow in hand"), + + ; + private final String str; + + ShowWhen(String str) { + this.str = str; + } + + @Override + public String toString() { + return str; + } + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java index 60dbf508e..14b16c136 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java @@ -45,11 +45,6 @@ public class DevConfig { public boolean worldEdit = false; @Expose - @ConfigOption(name = "Bow Sound distance", desc = "The distance in blocks where the sound of shooting a bow will be used for the QuiverAPI.") - @ConfigEditorSlider(minValue = 0, maxValue = 50, minStep = 1) - public int bowSoundDistance = 5; - - @Expose @ConfigOption(name = "Unknown Lines warning", desc = "Gives a chat warning when unknown lines are found in the scoreboard." + "\nCustom Scoreboard debug option") @ConfigEditorBoolean 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 b0f525ada..1bef14366 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 @@ -219,11 +219,4 @@ public class InventoryConfig { @ConfigEditorBoolean @FeatureToggle public boolean shiftClickBrewing = false; - - @Expose - @ConfigOption(name = "Low Quiver Alert", desc = "Notifies you when your Quiver runs out of arrows.") - @ConfigEditorBoolean - @FeatureToggle - public boolean quiverAlert = false; - } |
