summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features
diff options
context:
space:
mode:
authorDavid Cole <40234707+DavidArthurCole@users.noreply.github.com>2024-07-30 05:41:20 -0400
committerGitHub <noreply@github.com>2024-07-30 11:41:20 +0200
commit29682879dd0375d83e27fb07084e0822945d8e3f (patch)
treeebf7d7c31c2d74a271dc7ae179eda05ca5829089 /src/main/java/at/hannibal2/skyhanni/config/features
parent9edcf44987a1ef394d170f1980dd005fca1c1693 (diff)
downloadskyhanni-29682879dd0375d83e27fb07084e0822945d8e3f.tar.gz
skyhanni-29682879dd0375d83e27fb07084e0822945d8e3f.tar.bz2
skyhanni-29682879dd0375d83e27fb07084e0822945d8e3f.zip
Improvement: Powder Mining Chat Filter V2 (#2152)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningFilterConfig.java116
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningGemstoneFilterConfig.java62
3 files changed, 184 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java
index c87102b5b..0187af82e 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java
@@ -2,12 +2,18 @@ package at.hannibal2.skyhanni.config.features.chat;
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.ConfigOption;
public class FilterTypesConfig {
@Expose
+ @ConfigOption(name = "Powder Mining", desc = "")
+ @Accordion
+ public PowderMiningFilterConfig powderMiningFilter = new PowderMiningFilterConfig();
+
+ @Expose
@ConfigOption(name = "Hypixel Lobbies", desc = "Hide announcements in Hypixel lobbies " +
"(player joins, loot boxes, prototype lobby messages, radiating generosity, Hypixel tournaments)")
@ConfigEditorBoolean
@@ -51,13 +57,6 @@ public class FilterTypesConfig {
public boolean winterGift = false;
@Expose
- @ConfigOption(name = "Powder Mining", desc = "Hide messages while opening chests in the Crystal Hollows. " +
- "(except powder numbers over 1k, essence numbers over 2, Prehistoric Eggs, and Automaton Parts)")
- @ConfigEditorBoolean
- @FeatureToggle
- public boolean powderMining = false;
-
- @Expose
@ConfigOption(name = "Kill Combo", desc = "Hide messages about your Kill Combo from the Grandma Wolf pet.")
@ConfigEditorBoolean
@FeatureToggle
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningFilterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningFilterConfig.java
new file mode 100644
index 000000000..7eb2f19b8
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningFilterConfig.java
@@ -0,0 +1,116 @@
+package at.hannibal2.skyhanni.config.features.chat;
+
+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.ConfigEditorDraggableList;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import static at.hannibal2.skyhanni.config.features.chat.PowderMiningFilterConfig.SimplePowderMiningRewardTypes.ASCENSION_ROPE;
+import static at.hannibal2.skyhanni.config.features.chat.PowderMiningFilterConfig.SimplePowderMiningRewardTypes.JUNGLE_HEART;
+import static at.hannibal2.skyhanni.config.features.chat.PowderMiningFilterConfig.SimplePowderMiningRewardTypes.OIL_BARREL;
+import static at.hannibal2.skyhanni.config.features.chat.PowderMiningFilterConfig.SimplePowderMiningRewardTypes.SLUDGE_JUICE;
+import static at.hannibal2.skyhanni.config.features.chat.PowderMiningFilterConfig.SimplePowderMiningRewardTypes.TREASURITE;
+import static at.hannibal2.skyhanni.config.features.chat.PowderMiningFilterConfig.SimplePowderMiningRewardTypes.WISHING_COMPASS;
+import static at.hannibal2.skyhanni.config.features.chat.PowderMiningFilterConfig.SimplePowderMiningRewardTypes.YOGGIE;
+
+public class PowderMiningFilterConfig {
+ @Expose
+ @ConfigOption(name = "Enabled", desc = "Hide messages while opening chests in the Crystal Hollows.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean enabled = false;
+
+ @Expose
+ @ConfigOption(
+ name = "Powder", desc = "Hide §dGemstone §7and §aMithril §7Powder rewards under a certain amount." +
+ "\n§a0§7: §aShow all\n§c60000§7: §cHide all"
+ )
+ @ConfigEditorSlider(minValue = 0, maxValue = 60000, minStep = 500)
+ public int powderFilterThreshold = 1000;
+
+ @Expose
+ @ConfigOption(
+ name = "Essence", desc = "Hide §6Gold §7and §bDiamond §7Essence rewards under a certain amount." +
+ "\n§a0§7: §aShow all\n§c20§7: §cHide all"
+ )
+ @ConfigEditorSlider(minValue = 0, maxValue = 20, minStep = 1)
+ public int essenceFilterThreshold = 5;
+
+ public enum SimplePowderMiningRewardTypes {
+
+ ASCENSION_ROPE("§9Ascension Rope"),
+ WISHING_COMPASS("§aWishing Compass"),
+ OIL_BARREL("§aOil Barrel"),
+ PREHISTORIC_EGG("§fPrehistoric Egg"),
+ PICKONIMBUS("§5Pickonimbus 2000"),
+ JUNGLE_HEART("§6Jungle Heart"),
+ SLUDGE_JUICE("§aSludge Juice"),
+ YOGGIE("§aYoggie"),
+ ROBOT_PARTS("§9Robot Parts"),
+ TREASURITE("§5Treasurite"),
+ ;
+
+ private final String name;
+
+ SimplePowderMiningRewardTypes(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+ }
+
+ @Expose
+ @ConfigOption(name = "Common Items", desc = "Hide reward messages for listed items.")
+ @ConfigEditorDraggableList
+ public List<SimplePowderMiningRewardTypes> simplePowderMiningTypes = new ArrayList<>(Arrays.asList(
+ ASCENSION_ROPE,
+ WISHING_COMPASS,
+ OIL_BARREL,
+ JUNGLE_HEART,
+ SLUDGE_JUICE,
+ YOGGIE,
+ TREASURITE
+ ));
+
+ @Expose
+ @ConfigOption(name = "Goblin Egg", desc = "Hide Goblin Egg rewards that are below a certain rarity.")
+ @ConfigEditorDropdown
+ public GoblinEggFilterEntry goblinEggs = GoblinEggFilterEntry.YELLOW_UP;
+
+ public enum GoblinEggFilterEntry {
+ SHOW_ALL("Show all"),
+ HIDE_ALL("Hide all"),
+ GREEN_UP("Show §aGreen §7and up"),
+ YELLOW_UP("Show §eYellow §7and up"),
+ RED_UP("Show §cRed §7and up"),
+ BLUE_ONLY("Show §3Blue §7only");
+
+ private final String name;
+
+ GoblinEggFilterEntry(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+ }
+
+ @Expose
+ @ConfigOption(name = "Gemstones", desc = "")
+ @Accordion
+ public PowderMiningGemstoneFilterConfig gemstoneFilterConfig = new PowderMiningGemstoneFilterConfig();
+
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningGemstoneFilterConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningGemstoneFilterConfig.java
new file mode 100644
index 000000000..2b4936af1
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningGemstoneFilterConfig.java
@@ -0,0 +1,62 @@
+package at.hannibal2.skyhanni.config.features.chat;
+
+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;
+
+public class PowderMiningGemstoneFilterConfig {
+
+ @Expose
+ @ConfigOption(name = "Stronger Tool Messages", desc = "Hide 'You need a stronger tool..' messages.")
+ @ConfigEditorBoolean
+ public boolean strongerToolMessages = true;
+
+ @Expose
+ @ConfigOption(name = "Ruby", desc = "Hide Ruby gemstones under a certain quality.")
+ @ConfigEditorDropdown
+ public GemstoneFilterEntry rubyGemstones = GemstoneFilterEntry.FINE_ONLY;
+
+ @Expose
+ @ConfigOption(name = "Sapphire", desc = "Hide Sapphire gemstones under a certain quality.")
+ @ConfigEditorDropdown
+ public GemstoneFilterEntry sapphireGemstones = GemstoneFilterEntry.FINE_ONLY;
+
+ @Expose
+ @ConfigOption(name = "Amber", desc = "Hide Amber gemstones under a certain quality.")
+ @ConfigEditorDropdown
+ public GemstoneFilterEntry amberGemstones = GemstoneFilterEntry.FINE_ONLY;
+
+ @Expose
+ @ConfigOption(name = "Amethyst", desc = "Hide Amethyst gemstones under a certain quality.")
+ @ConfigEditorDropdown
+ public GemstoneFilterEntry amethystGemstones = GemstoneFilterEntry.FINE_ONLY;
+
+ @Expose
+ @ConfigOption(name = "Jade", desc = "Hide Jade gemstones under a certain quality.")
+ @ConfigEditorDropdown
+ public GemstoneFilterEntry jadeGemstones = GemstoneFilterEntry.FINE_ONLY;
+
+ @Expose
+ @ConfigOption(name = "Topaz", desc = "Hide Topaz gemstones under a certain quality.")
+ @ConfigEditorDropdown
+ public GemstoneFilterEntry topazGemstones = GemstoneFilterEntry.FINE_ONLY;
+
+ public enum GemstoneFilterEntry {
+ SHOW_ALL("Show All"),
+ HIDE_ALL("Hide all"),
+ FLAWED_UP("Show §aFlawed §7or higher"),
+ FINE_ONLY("Show §9Fine §7only");
+
+ private final String str;
+
+ GemstoneFilterEntry(String str) {
+ this.str = str;
+ }
+
+ @Override
+ public String toString() {
+ return str;
+ }
+ }
+}