diff options
author | Appability <appable@icloud.com> | 2022-10-13 20:17:26 -0700 |
---|---|---|
committer | Appability <appable@icloud.com> | 2022-10-13 20:17:26 -0700 |
commit | d4245bb705c7d8965e6bf63c90614dcfef38dcf7 (patch) | |
tree | 70d6e1bedd10c48a922855d3845cd4e2cc495516 /src/main/kotlin/com/ambientaddons/features/dungeon/terminals | |
parent | d0cbc11018c8126575117aaeb2b861957386fa9a (diff) | |
download | AmbientAddons-d4245bb705c7d8965e6bf63c90614dcfef38dcf7.tar.gz AmbientAddons-d4245bb705c7d8965e6bf63c90614dcfef38dcf7.tar.bz2 AmbientAddons-d4245bb705c7d8965e6bf63c90614dcfef38dcf7.zip |
various fixes
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/features/dungeon/terminals')
-rw-r--r-- | src/main/kotlin/com/ambientaddons/features/dungeon/terminals/MelodyHelper.kt | 10 |
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() |