diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-09-29 18:10:12 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-29 10:10:12 +0200 |
commit | 37a186a932fcd81cfed66642e6a7833937f43b3a (patch) | |
tree | 46c88685f9b9ce804366d68bb96cb02a8e8b3ae4 /src/main/java/at/hannibal2/skyhanni/features/gui | |
parent | 1f4ce6c4207fe6ef6eaff48a35f61b18a524a429 (diff) | |
download | skyhanni-37a186a932fcd81cfed66642e6a7833937f43b3a.tar.gz skyhanni-37a186a932fcd81cfed66642e6a7833937f43b3a.tar.bz2 skyhanni-37a186a932fcd81cfed66642e6a7833937f43b3a.zip |
Backend: Detekt Fixes Part 2 (#2607)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/gui')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvent.kt | 15 |
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() |