From 00b8eb5ab91b2870f8263e1ac8e66cb973916b1c Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 17 Nov 2023 12:28:53 +0100 Subject: Random regex code cleanup --- .../java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/combat') diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt index 966f8ad06..81426c90f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/SpawnTimers.kt @@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.SimpleTimeMark +import at.hannibal2.skyhanni.utils.StringUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeUtils.format import at.hannibal2.skyhanni.utils.toLorenzVec @@ -25,8 +26,8 @@ class SpawnTimers { private val arachneAltarLocation = LorenzVec(-283f, 51f, -179f) private var arachneSpawnTime = SimpleTimeMark.farPast() - private val arachneFragmentMessage = "^☄ [a-z0-9_]{2,22} placed an arachne's calling! something is awakening! \\(4/4\\)\$".toRegex() - private val arachneCrystalMessage = "^☄ [a-z0-9_]{2,22} placed an arachne crystal! something is awakening!$".toRegex() + private val arachneFragmentMessage = "^☄ [a-z0-9_]{2,22} placed an arachne's calling! something is awakening! \\(4/4\\)\$".toPattern() + private val arachneCrystalMessage = "^☄ [a-z0-9_]{2,22} placed an arachne crystal! something is awakening!$".toPattern() private var saveNextTickParticles = false private var particleCounter = 0 private var tickTime: Long = 0 @@ -95,4 +96,4 @@ class SpawnTimers { } fun isEnabled() = IslandType.SPIDER_DEN.isInIsland() && LorenzUtils.skyBlockArea == "Arachne's Sanctuary" && config.showArachneSpawnTimer -} \ No newline at end of file +} -- cgit