From d4245bb705c7d8965e6bf63c90614dcfef38dcf7 Mon Sep 17 00:00:00 2001 From: Appability Date: Thu, 13 Oct 2022 20:17:26 -0700 Subject: various fixes --- .../ambientaddons/features/dungeon/terminals/MelodyHelper.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/com/ambientaddons/features/dungeon/terminals') 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,14 +9,22 @@ 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 -- cgit