From 6b31a0143364c11aada80f511413eb87e0ec7b92 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:43:01 +0200 Subject: Fix: Scoreboard Error with Barry Protestors (#2480) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../features/gui/customscoreboard/ScoreboardEvent.kt | 2 ++ .../features/gui/customscoreboard/ScoreboardPattern.kt | 17 +++++++++++++++++ .../gui/customscoreboard/UnknownLinesHandler.kt | 2 ++ 3 files changed, 21 insertions(+) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt index d35952cb3..efe7c953d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt @@ -550,6 +550,8 @@ private fun getRiftLines() = getSbLines().filter { line -> || SbPattern.riftAveikxPattern.matches(line) || SbPattern.riftHayEatenPattern.matches(line) || SbPattern.cluesPattern.matches(line) + || SbPattern.barryProtestorsQuestlinePattern.matches(line) + || SbPattern.barryProtestorsHandledPattern.matches(line) } private fun getEssenceLines(): List = listOf(getSbLines().first { SbPattern.essencePattern.matches(it) }) 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 390d34e59..9e2694ec0 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 @@ -497,6 +497,23 @@ object ScoreboardPattern { "Clues: §.\\d+/\\d+", ) + /** + * REGEX-TEST: §eFirst Up + * REGEX-TEST: Find and talk with Barry + */ + val barryProtestorsQuestlinePattern by riftSb.pattern( + "protestors.quest", + "§eFirst Up|Find and talk with Barry", + ) + + /** + * REGEX-TEST: Protestors handled: §b5/7 + */ + val barryProtestorsHandledPattern by riftSb.pattern( + "protestors.handled", + "Protestors handled: §b\\d+\\/\\d+", + ) + private val carnivalSb = scoreboardGroup.group("carnival") /** 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 2c0ba2c86..4e102ee34 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 @@ -126,6 +126,8 @@ object UnknownLinesHandler { SbPattern.riftHayEatenPattern, SbPattern.fossilDustPattern, SbPattern.cluesPattern, + SbPattern.barryProtestorsQuestlinePattern, + SbPattern.barryProtestorsHandledPattern, SbPattern.carnivalPattern, SbPattern.carnivalTasksPattern, SbPattern.carnivalTokensPattern, -- cgit