From 5d8a5b582ef436fadbd74ff1a3148dfa96e8a400 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 9 Dec 2023 02:04:00 +0100 Subject: code cleanup --- .../features/event/lobby/waypoints/christmas/PresentWaypoints.kt | 3 ++- src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt index c400da59b..39ff40765 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt @@ -28,6 +28,7 @@ class PresentWaypoints { private val presentSet get() = presentLocations[HypixelData.lobbyType] private val presentEntranceSet get() = presentEntranceLocations[HypixelData.lobbyType] + // TODO use repo pattern private val presentAlreadyFoundPattern = "§cYou have already found this present!".toPattern() private val presentFoundPattern = "§aYou found a.*present! §r§e\\(§r§b\\d+§r§e/§r§b\\d+§r§e\\)".toPattern() private val allFoundPattern = "§aCongratulations! You found all the presents in every lobby!".toPattern() @@ -110,5 +111,5 @@ class PresentWaypoints { } private fun isEnabled(): Boolean = - LorenzUtils.onHypixel && HypixelData.inLobby && (config.allWaypoints || config.allEntranceWaypoints) + LorenzUtils.inHypixelLobby && (config.allWaypoints || config.allEntranceWaypoints) } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index d9ec96dac..2724d40e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -51,6 +51,8 @@ object LorenzUtils { val inSkyBlock get() = onHypixel && HypixelData.skyBlock + val inHypixelLobby get() = onHypixel && HypixelData.inLobby + val inDungeons get() = inSkyBlock && DungeonAPI.inDungeon() /** -- cgit