aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-05-29 07:43:22 +0200
committerGitHub <noreply@github.com>2024-05-29 07:43:22 +0200
commit2250aa8b2a64ea1f1850b74c5f4f34ffa617609e (patch)
tree1c01b2fd03da182f851bf176ec4c6b050c42d1b0 /src/main/java/at/hannibal2/skyhanni/config/features
parenta1801699f7191de07523c8d54359234645c20520 (diff)
downloadskyhanni-2250aa8b2a64ea1f1850b74c5f4f34ffa617609e.tar.gz
skyhanni-2250aa8b2a64ea1f1850b74c5f4f34ffa617609e.tar.bz2
skyhanni-2250aa8b2a64ea1f1850b74c5f4f34ffa617609e.zip
Feature: Trophy Fish Display (#1754)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishDisplayConfig.java202
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java5
2 files changed, 207 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishDisplayConfig.java
new file mode 100644
index 000000000..a4fa9940f
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishDisplayConfig.java
@@ -0,0 +1,202 @@
+package at.hannibal2.skyhanni.config.features.fishing.trophyfishing;
+
+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.ConfigEditorDraggableList;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigLink;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+import io.github.notenoughupdates.moulconfig.observer.Property;
+import org.lwjgl.input.Keyboard;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class TrophyFishDisplayConfig {
+
+ @Expose
+ @ConfigOption(
+ name = "Enabled",
+ desc = "Show a display of all trophy fishes ever caught."
+ )
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public Property<Boolean> enabled = Property.of(false);
+
+ @Expose
+ @ConfigOption(name = "When Show", desc = "Change when the trophy fish display should be visible in Crimson Isle.")
+ @ConfigEditorDropdown
+ public Property<WhenToShow> whenToShow = Property.of(WhenToShow.ALWAYS);
+
+ public enum WhenToShow {
+ ALWAYS("Always"),
+ ONLY_IN_INVENTORY("In inventory"),
+ ONLY_WITH_ROD_IN_HAND("Rod in hand"),
+ ONLY_WITH_KEYBIND("On keybind"),
+ ;
+
+ private final String str;
+
+ WhenToShow(String str) {
+ this.str = str;
+ }
+
+ @Override
+ public String toString() {
+ return str;
+ }
+ }
+
+ @Expose
+ @ConfigOption(name = "Keybind", desc = "")
+ @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
+ public int keybind = Keyboard.KEY_NONE;
+
+ @Expose
+ @ConfigOption(
+ name = "Hunter Armor",
+ desc = "Only show when wearing a full Hunter Armor."
+ )
+ @ConfigEditorBoolean
+ public Property<Boolean> requireHunterArmor = Property.of(false);
+
+ @Expose
+ @ConfigOption(
+ name = "Highlight New",
+ desc = "Highlight new trophies green for couple seconds."
+ )
+ @ConfigEditorBoolean
+ public Property<Boolean> highlightNew = Property.of(true);
+
+ @Expose
+ @ConfigOption(name = "Extra space", desc = "Space between each line of text.")
+ @ConfigEditorSlider(
+ minValue = 0,
+ maxValue = 10,
+ minStep = 1)
+ public Property<Integer> extraSpace = Property.of(1);
+
+ @Expose
+ @ConfigOption(name = "Sorted By", desc = "Sorting type of items in sack.")
+ @ConfigEditorDropdown
+ public Property<TrophySorting> sortingType = Property.of(TrophySorting.ITEM_RARITY);
+
+ public enum TrophySorting {
+ ITEM_RARITY("Item Rarity"),
+ TOTAL_AMOUNT("Total Amount"),
+ BRONZE_AMOUNT("Bronze Amount"),
+ SILVER_AMOUNT("Silver Amount"),
+ GOLD_AMOUNT("Gold Amount"),
+ DIAMOND_AMOUNT("Diamond Amount"),
+ HIGHEST_RARITY("Highest Rariy"),
+ NAME("Name Alphabetical"),
+ ;
+
+ private final String str;
+
+ TrophySorting(String str) {
+ this.str = str;
+ }
+
+ @Override
+ public String toString() {
+ return str;
+ }
+ }
+
+ @Expose
+ @ConfigOption(
+ name = "Reverse Order",
+ desc = "Reverse the sorting order."
+ )
+ @ConfigEditorBoolean
+ public Property<Boolean> reverseOrder = Property.of(false);
+
+ @Expose
+ @ConfigOption(
+ name = "Text Order",
+ desc = "Drag text to change the line format."
+ )
+ @ConfigEditorDraggableList
+ public Property<List<TextPart>> textOrder = Property.of(new ArrayList<>(Arrays.asList(
+ TextPart.NAME,
+ TextPart.ICON,
+ TextPart.TOTAL,
+ TextPart.BRONZE,
+ TextPart.SILVER,
+ TextPart.GOLD,
+ TextPart.DIAMOND
+ )));
+
+ public enum TextPart {
+ ICON("Item Icon"),
+ NAME("Item Name"),
+ BRONZE("Amount Bronze"),
+ SILVER("Amount Silver"),
+ GOLD("Amount Gold"),
+ DIAMOND("Amount Diamond"),
+ TOTAL("Amount Total"),
+ ;
+
+ private final String str;
+
+ TextPart(String str) {
+ this.str = str;
+ }
+
+ @Override
+ public String toString() {
+ return str;
+ }
+ }
+
+ @Expose
+ @ConfigOption(
+ name = "Show ✖",
+ desc = "instead of the number 0, show §c✖ §7 if not found."
+ )
+ @ConfigEditorBoolean
+ public Property<Boolean> showCross = Property.of(false);
+
+ @Expose
+ @ConfigOption(
+ name = "Show ✔",
+ desc = "instead of the exact numbers, show §e§l✔ §7 if found."
+ )
+ @ConfigEditorBoolean
+ public Property<Boolean> showCheckmark = Property.of(false);
+
+ @Expose
+ @ConfigOption(name = "Only Show Missing", desc = "Only show Trophy Fishes that are still missing at this rarity.")
+ @ConfigEditorDropdown
+ public Property<HideCaught> onlyShowMissing = Property.of(HideCaught.NONE);
+
+ public enum HideCaught {
+ NONE("Show All"),
+ BRONZE("Bronze"),
+ SILVER("Silver"),
+ GOLD("Gold"),
+ DIAMOND("Diamond"),
+ ;
+
+ private final String str;
+
+ HideCaught(String str) {
+ this.str = str;
+ }
+
+ @Override
+ public String toString() {
+ return str;
+ }
+ }
+
+ @Expose
+ @ConfigLink(owner = TrophyFishDisplayConfig.class, field = "enabled")
+ public Position position = new Position(144, 139, false, true);
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java
index 25f542863..3449c7b5a 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java
@@ -15,6 +15,11 @@ public class TrophyFishingConfig {
public ChatMessagesConfig chatMessages = new ChatMessagesConfig();
@Expose
+ @ConfigOption(name = "Trophy Fishing Display", desc = "")
+ @Accordion
+ public TrophyFishDisplayConfig display = new TrophyFishDisplayConfig();
+
+ @Expose
@ConfigOption(name = "Geyser Fishing", desc = "")
@Accordion
public GeyserFishingConfig geyserOptions = new GeyserFishingConfig();