aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt
index b6d1ba219..d79ac47ce 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt
@@ -101,9 +101,9 @@ object DungeonAPI {
}
}
- fun inDungeon() = IslandType.CATACOMBS.isInIsland()
+ fun inDungeon(): Boolean = IslandType.CATACOMBS.isInIsland()
- fun isOneOf(vararg floors: String) = dungeonFloor?.equalsOneOf(*floors) == true
+ fun isOneOf(vararg floors: String): Boolean = dungeonFloor?.equalsOneOf(*floors) == true
fun handleBossMessage(rawMessage: String) {
if (!inDungeon()) return
@@ -132,22 +132,20 @@ object DungeonAPI {
return bossName.endsWith(correctBoss)
}
- fun getTime(): String =
- ScoreboardData.sidebarLinesFormatted.matchFirst(timePattern) {
- "${groupOrNull("minutes") ?: "00"}:${group("seconds")}"
- } ?: ""
+ fun getTime(): String = ScoreboardData.sidebarLinesFormatted.matchFirst(timePattern) {
+ "${groupOrNull("minutes") ?: "00"}:${group("seconds")}"
+ } ?: ""
fun getCurrentBoss(): DungeonFloor? {
val floor = dungeonFloor ?: return null
return DungeonFloor.valueOf(floor.replace("M", "F"))
}
- fun getRoomID(): String? {
- return ScoreboardData.sidebarLinesFormatted.matchFirst(dungeonRoomPattern) {
- group("roomId")
- }
+ fun getRoomID(): String? = ScoreboardData.sidebarLinesFormatted.matchFirst(dungeonRoomPattern) {
+ group("roomId")
}
+
fun getColor(level: Int): String = when {
level >= 50 -> "§c§l"
level >= 45 -> "§c"