From cc0e94d6d2b935ae5f8b1704de524871caea4148 Mon Sep 17 00:00:00 2001 From: David Cole <40234707+DavidArthurCole@users.noreply.github.com> Date: Sun, 29 Sep 2024 21:55:27 -0400 Subject: Fix: Jasper Gemstones not in Powder Mining Filter (#2618) --- .../config/features/chat/PowderMiningGemstoneFilterConfig.java | 5 +++++ .../at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni') 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 index 3a44738ca..e2b1c5d18 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningGemstoneFilterConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/PowderMiningGemstoneFilterConfig.java @@ -42,6 +42,11 @@ public class PowderMiningGemstoneFilterConfig { @ConfigEditorDropdown public GemstoneFilterEntry topazGemstones = GemstoneFilterEntry.FINE_UP; + @Expose + @ConfigOption(name = "Jasper", desc = "Hide Jasper gemstones under a certain quality.") + @ConfigEditorDropdown + public GemstoneFilterEntry jasperGemstones = GemstoneFilterEntry.FINE_UP; + public enum GemstoneFilterEntry { SHOW_ALL("Show All"), HIDE_ALL("Hide all"), diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt index d6e992738..88ac9df69 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt @@ -246,10 +246,13 @@ object PowderMiningChatFilter { * REGEX-TEST: §r§a❈ Flawed Amethyst Gemstone §r§8x4 * REGEX-TEST: §r§9⸕ Fine Amber Gemstone * REGEX-TEST: §r§5⸕ Flawless Amber Gemstone + * REGEX-TEST: §r§f❁ Rough Jasper Gemstone §r§8x24 + * REGEX-TEST: §r§a❁ Flawed Jasper Gemstone */ + @Suppress("MaxLineLength") private val gemstonePattern by patternGroup.pattern( "reward.gemstone", - "§r§[fa9][❤❈☘⸕✎✧] (?Rough|Flawed|Fine|Flawless) (?Ruby|Amethyst|Jade|Amber|Sapphire|Topaz) Gemstone( §r§8x(?[\\d,]+))?", + "§r§[fa9][❤❈☘⸕✎✧❁] (?Rough|Flawed|Fine|Flawless) (?Ruby|Amethyst|Jade|Amber|Sapphire|Topaz|Jasper) Gemstone( §r§8x(?[\\d,]+))?", ) @Suppress("CyclomaticComplexMethod") @@ -381,6 +384,7 @@ object PowderMiningChatFilter { "amethyst" -> gemstoneConfig.amethystGemstones "jade" -> gemstoneConfig.jadeGemstones "topaz" -> gemstoneConfig.topazGemstones + "jasper" -> gemstoneConfig.jasperGemstones // Failure case that should never be reached else -> return "no_filter" } -- cgit