From 2edb817cd40a087af659994b05d08f4b395f844b Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:22:32 +0300 Subject: [PATCH] can be interrupted by signal --- modular_ss220/text_to_speech/code/tts_atom.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modular_ss220/text_to_speech/code/tts_atom.dm b/modular_ss220/text_to_speech/code/tts_atom.dm index 5acd5bb55d75..f90af41c3eba 100644 --- a/modular_ss220/text_to_speech/code/tts_atom.dm +++ b/modular_ss220/text_to_speech/code/tts_atom.dm @@ -6,6 +6,9 @@ add_tts_component() /atom/proc/cast_tts(mob/listener, message, atom/location, is_local = TRUE, effect = SOUND_EFFECT_NONE, traits = TTS_TRAIT_RATE_FASTER, preSFX, postSFX) + SHOULD_CALL_PARENT(TRUE) + if(SEND_SIGNAL(src, COMSIG_ATOM_PRE_TTS_CAST, listener, message, location, is_local, effect, traits, preSFX, postSFX) & COMPONENT_TTS_INTERRUPT) + return SEND_SIGNAL(src, COMSIG_ATOM_TTS_CAST, listener, message, location, is_local, effect, traits, preSFX, postSFX) // TODO: Do it better?