diff options
| author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-04-09 20:49:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-09 20:49:52 +0200 |
| commit | 58f1fec99d532c517aaf309772874ad5629ea39b (patch) | |
| tree | e4c52e21f7bbbc6920253584680dae33770693d1 /src/main/java/at/hannibal2/skyhanni/features/gui | |
| parent | 259acef3cffac049f20c528cb21740e0ec394f3e (diff) | |
| download | skyhanni-58f1fec99d532c517aaf309772874ad5629ea39b.tar.gz skyhanni-58f1fec99d532c517aaf309772874ad5629ea39b.tar.bz2 skyhanni-58f1fec99d532c517aaf309772874ad5629ea39b.zip | |
Backend: Switch from LorenzUtils.inDungeons to DungeonAPI.inDungeon() (#1378)
Co-authored-by: Cal <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/gui')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt | 4 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt index e00ee2397..2bf173ab9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt @@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.data.QuiverAPI.NONE_ARROW_TYPE import at.hannibal2.skyhanni.data.QuiverAPI.asArrowPercentage import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.data.SlayerAPI +import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.arrowConfig import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.devConfig import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.displayConfig @@ -28,7 +29,6 @@ import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter import at.hannibal2.skyhanni.utils.LorenzUtils.inAdvancedMiningIsland import at.hannibal2.skyhanni.utils.LorenzUtils.inAnyIsland -import at.hannibal2.skyhanni.utils.LorenzUtils.inDungeons import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.NumberUtil.percentageColor import at.hannibal2.skyhanni.utils.RenderUtils.HorizontalAlignment @@ -754,7 +754,7 @@ private fun getPartyDisplayPair() = listOf(title, *partyList).map { it to HorizontalAlignment.LEFT } } -private fun getPartyShowWhen() = if (inDungeons) { +private fun getPartyShowWhen() = if (DungeonAPI.inDungeon()) { false // Hidden bc the scoreboard lines already exist } else { if (partyConfig.showPartyEverywhere) { 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 1722cd431..6e21e7610 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 @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.gui.customscoreboard import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ScoreboardData +import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.eventsConfig import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardEvents.VOTING import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern @@ -10,7 +11,6 @@ import at.hannibal2.skyhanni.features.misc.ServerRestartTitle import at.hannibal2.skyhanni.features.rift.area.stillgorechateau.RiftBloodEffigies import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter import at.hannibal2.skyhanni.utils.LorenzUtils.inAdvancedMiningIsland -import at.hannibal2.skyhanni.utils.LorenzUtils.inDungeons import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.StringUtils.anyMatches import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher @@ -260,9 +260,7 @@ private fun getDungeonsLines() = listOf( getSbLines().filter { line -> patterns.any { it.matches(line) } }.map { it.removePrefix("§r") } } -private fun getDungeonsShowWhen(): Boolean { - return IslandType.CATACOMBS.isInIsland() || inDungeons -} +private fun getDungeonsShowWhen(): Boolean = DungeonAPI.inDungeon() private fun getKuudraLines() = listOf( SbPattern.autoClosingPattern, |
