From 3b8c54f0928beffeb64db6879e47b145b28854e0 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Fri, 31 May 2024 01:13:27 +0200 Subject: Fix: Custom Scoreboard Powder Error (#1947) --- .../features/gui/customscoreboard/ScoreboardPattern.kt | 10 ++++++++++ .../features/gui/customscoreboard/UnknownLinesHandler.kt | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt index 2db0c37f7..1f793709a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt @@ -186,6 +186,16 @@ object ScoreboardPattern { "powder", "(?:§.)*᠅ (?:§.)(?Gemstone|Mithril|Glacite)(?: Powder)?(?:§.)*:? (?:§.)*(?[\\d,.]*)" ) + + /** + * REGEX-TEST: §2᠅ §fMithril§f:§695 + * REGEX-TEST: §d᠅ §fGemstone§f + * REGEX-TEST: §d᠅ §fGemstone§f§e(+1) + */ + val powderGreedyPattern by miningSb.pattern( + "powdergreedy", + "(?:§.)*᠅ (?:§.)(?Gemstone|Mithril|Glacite)(?: Powder)?.*$" + ) val windCompassPattern by miningSb.pattern( "windcompass", "§9Wind Compass$" diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt index 6ed53c60e..eeaa0b447 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt @@ -60,7 +60,7 @@ object UnknownLinesHandler { SbPattern.mobLocationPattern, SbPattern.jacobsContestPattern, SbPattern.plotPattern, - SbPattern.powderPattern, + SbPattern.powderGreedyPattern, SbPattern.windCompassPattern, SbPattern.windCompassArrowPattern, SbPattern.miningEventPattern, -- cgit