aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/features/dungeon/terminals
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/features/dungeon/terminals')
-rw-r--r--src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt b/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt
index 468a6a9..74b23e7 100644
--- a/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt
+++ b/src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt
@@ -9,15 +9,23 @@ import com.ambientaddons.utils.Extensions.stripControlCodes
import com.ambientaddons.utils.SkyBlock
import net.minecraftforge.client.event.ClientChatReceivedEvent
import net.minecraftforge.client.event.GuiOpenEvent
+import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
object MelodyHelper {
- private val completedStageRegex = Regex("/^[A-za-z0-9_]{3,16} (?:completed|activated) a (?:lever|terminal|device)! \\((?:[07]\\/7|[08]\\/8)\\)/")
+ private val completedStageRegex = Regex("/^[A-za-z0-9_]{3,16} (?:completed|activated) a (?:lever|terminal|device)! \\((?:[07]\\/7|[08]\\/8)\\)")
private var hasSaidMeowlody = false
private var hasSaidThrottled = false
private var isThrottled = false
@SubscribeEvent
+ fun onWorldUnload(event: WorldEvent.Unload) {
+ hasSaidMeowlody = false
+ hasSaidThrottled = false
+ isThrottled = false
+ }
+
+ @SubscribeEvent
fun onChat(event: ClientChatReceivedEvent) {
if (SkyBlock.dungeonFloor?.floor != 7) return
val unformatted = event.message.unformattedText.stripControlCodes()