Skip to content

Commit

Permalink
can be interrupted by signal
Browse files Browse the repository at this point in the history
  • Loading branch information
larentoun committed Oct 24, 2024
1 parent 6a32f2a commit 2edb817
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modular_ss220/text_to_speech/code/tts_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 2edb817

Please sign in to comment.