Skip to content

Commit

Permalink
Merge branch 'master' into giant_armored_seprentids
Browse files Browse the repository at this point in the history
  • Loading branch information
msw7007 authored Nov 1, 2024
2 parents c8a5bd8 + 8018a54 commit 3dbd3b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modular_ss220/text_to_speech/code/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@

//from base of atom/change_tts_seed(): (mob/chooser, override, fancy_voice_input_tgui)
#define COMSIG_ATOM_TTS_SEED_CHANGE "atom_tts_seed_change"
//called for tts_component: (atom/speaker, mob/listener, message, atom/location, is_local, effect, traits, preSFX, postSFX)
//called for tts_component: (mob/listener, message, atom/location, is_local, effect, traits, preSFX, postSFX)
#define COMSIG_ATOM_TTS_CAST "atom_tts_cast"
//from base of atom/tts_trait_add(): (atom/user, trait)
#define COMSIG_ATOM_TTS_TRAIT_ADD "atom_tts_trait_add"
//from base of atom/tts_trait_remove(): (atom/user, trait)
#define COMSIG_ATOM_TTS_TRAIT_REMOVE "atom_tts_trait_remove"
//from base of atom/cast_tts(): (mob/listener, message, atom/location, is_local, effect, traits, preSFX, postSFX)
#define COMSIG_ATOM_PRE_TTS_CAST "atom_pre_tts_cast"
#define COMPONENT_TTS_INTERRUPT (1<<0)
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
2 changes: 2 additions & 0 deletions modular_ss220/text_to_speech/code/~undefs/~undefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@

#undef COMSIG_ATOM_TTS_SEED_CHANGE
#undef COMSIG_ATOM_TTS_CAST
#undef COMSIG_ATOM_PRE_TTS_CAST
#undef COMPONENT_TTS_INTERRUPT
#undef COMSIG_ATOM_TTS_TRAIT_ADD
#undef COMSIG_ATOM_TTS_TRAIT_REMOVE

0 comments on commit 3dbd3b3

Please sign in to comment.