aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/gui')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt15
1 files changed, 7 insertions, 8 deletions
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 68dba3eee..ce4b5a4fa 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
@@ -7,7 +7,6 @@ import at.hannibal2.skyhanni.features.combat.SpidersDenAPI.isAtTopOfNest
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.eventsConfig
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardEvent.VOTING
-import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
import at.hannibal2.skyhanni.features.misc.ServerRestartTitle
import at.hannibal2.skyhanni.features.rift.area.stillgorechateau.RiftBloodEffigies
import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
@@ -347,7 +346,7 @@ private fun getTrapperLines() = buildList {
}
private fun getTrapperShowWhen(): Boolean =
- getSbLines().any { ScoreboardPattern.peltsPattern.matches(it) || ScoreboardPattern.mobLocationPattern.matches(it) }
+ getSbLines().any { SbPattern.peltsPattern.matches(it) || SbPattern.mobLocationPattern.matches(it) }
private fun getGardenCleanUpLines(): List<String> =
listOf(getSbLines().first { SbPattern.cleanUpPattern.matches(it) }.trim())
@@ -374,9 +373,9 @@ private fun getWinterLines() = buildList {
}
private fun getWinterShowWhen(): Boolean = getSbLines().any {
- ScoreboardPattern.winterEventStartPattern.matches(it) ||
- (ScoreboardPattern.winterNextWavePattern.matches(it) && !it.endsWith("Soon!")) ||
- ScoreboardPattern.winterWavePattern.matches(it)
+ SbPattern.winterEventStartPattern.matches(it)
+ || (SbPattern.winterNextWavePattern.matches(it) && !it.endsWith("Soon!"))
+ || SbPattern.winterWavePattern.matches(it)
}
private fun getNewYearLines() = listOf(getSbLines().first { SbPattern.newYearPattern.matches(it) })
@@ -395,7 +394,7 @@ private fun getSpookyLines() = buildList {
) // Candy
}
-private fun getSpookyShowWhen(): Boolean = getSbLines().any { ScoreboardPattern.spookyPattern.matches(it) }
+private fun getSpookyShowWhen(): Boolean = getSbLines().any { SbPattern.spookyPattern.matches(it) }
private fun getTablistEvent(): String? =
TabListData.getTabList().firstOrNull { SbPattern.eventNamePattern.matches(it) }
@@ -413,7 +412,7 @@ private fun getActiveEventLine(): List<String> {
val blockedEvents = listOf("Spooky Festival", "Carnival", "5th SkyBlock Anniversary", "New Year Celebration")
if (blockedEvents.contains(currentActiveEvent.removeColor())) return emptyList()
- val currentActiveEventTime = ScoreboardPattern.eventTimeEndsPattern.firstMatcher(TabWidget.EVENT.lines) {
+ val currentActiveEventTime = SbPattern.eventTimeEndsPattern.firstMatcher(TabWidget.EVENT.lines) {
group("time")
} ?: return emptyList()
@@ -425,7 +424,7 @@ private fun getActiveEventShowWhen(): Boolean =
private fun getSoonEventLine(): List<String> {
val soonActiveEvent = getTablistEvent() ?: return emptyList()
- val soonActiveEventTime = ScoreboardPattern.eventTimeStartsPattern.firstMatcher(TabWidget.EVENT.lines) {
+ val soonActiveEventTime = SbPattern.eventTimeStartsPattern.firstMatcher(TabWidget.EVENT.lines) {
group("time")
} ?: return emptyList()