aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-03-26 20:13:03 +0100
committerGitHub <noreply@github.com>2024-03-26 20:13:03 +0100
commit2f8737997d2539772456932ada630417d5a48b24 (patch)
tree7fedfff8c2e8881e3b8b9f253008dc05db27d04f /src
parent49c8865962aacc704e2bbeefcf6076367c76839a (diff)
downloadskyhanni-2f8737997d2539772456932ada630417d5a48b24.tar.gz
skyhanni-2f8737997d2539772456932ada630417d5a48b24.tar.bz2
skyhanni-2f8737997d2539772456932ada630417d5a48b24.zip
Fix: Fixed Hotdog Contest Error in Custom Scoreboard (#1273)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt25
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/UnknownLinesHandler.kt2
3 files changed, 27 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
index 6c914a50c..dabe6968b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
@@ -138,6 +138,12 @@ enum class ScoreboardEvents(
"§7Damage Soaked:\n" +
"§e▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎▎§7▎▎▎▎▎"
),
+ HOT_DOG_CONTEST(
+ ::getHotDogLines,
+ ::getHotDogShowWhen,
+ "§6Hot Dog Contest\n" +
+ "Eaten: §c0/50"
+ ),
ESSENCE(
::getEssenceLines,
::getEssenceShowWhen,
@@ -202,6 +208,7 @@ enum class ScoreboardEvents(
MINING_EVENTS,
DAMAGE,
MAGMA_BOSS,
+ HOT_DOG_CONTEST,
ESSENCE,
EFFIGIES,
ACTIVE_TABLIST_EVENTS
@@ -429,14 +436,6 @@ private fun getBroodmotherShowWhen(): Boolean {
return getSbLines().any { SbPattern.broodmotherPattern.matches(it) }
}
-private fun getOringoLines(): List<String> {
- return listOf(getSbLines().first { SbPattern.travelingZooPattern.matches(it) })
-}
-
-private fun getOringoShowWhen(): Boolean {
- return getSbLines().any { SbPattern.travelingZooPattern.matches(it) }
-}
-
private fun getMiningEventsLines() = buildList {
// Wind
if (getSbLines().any { SbPattern.windCompassPattern.matches(it) }
@@ -515,6 +514,16 @@ private fun getMagmaBossShowWhen(): Boolean {
return SbPattern.magmaChamberPattern.matches(HypixelData.skyBlockArea)
}
+private fun getHotDogLines(): List<String> {
+ return listOf(getSbLines().first { SbPattern.riftHotdogTitlePattern.matches(it) }) +
+ (getSbLines().first { SbPattern.timeLeftPattern.matches(it) }) +
+ (getSbLines().first { SbPattern.riftHotdogEatenPattern.matches(it) })
+}
+
+private fun getHotDogShowWhen(): Boolean {
+ return SbPattern.riftHotdogTitlePattern.anyMatches(getSbLines())
+}
+
private fun getEssenceLines(): List<String> {
return 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 dd46d2a44..e59878812 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
@@ -383,6 +383,14 @@ object ScoreboardPattern {
"dimension",
"^\\s*§fRift Dimension$"
)
+ val riftHotdogTitlePattern by riftSb.pattern(
+ "hotdogtitle",
+ "^§6Hot Dog Contest$"
+ )
+ val riftHotdogEatenPattern by riftSb.pattern(
+ "hotdogeaten",
+ "^Eaten: §.\\d+\\/\\d+$"
+ )
// Stats from the tablist
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 260b1ed48..f0f434b06 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
@@ -111,6 +111,8 @@ object UnknownLinesHandler {
SbPattern.timeLeftPattern,
SbPattern.darkAuctionCurrentItemPattern,
SbPattern.coldPattern,
+ SbPattern.riftHotdogTitlePattern,
+ SbPattern.riftHotdogEatenPattern,
)
unknownLines = unknownLines.filterNot { line ->