From d4c836738d18372626bdb66b893584815edf2be2 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Wed, 6 Nov 2024 23:29:31 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=B8=D0=BD=D1=82=D0=B5=D1=80=20=D0=B8?= =?UTF-8?q?=20=D1=80=D0=B0=D0=BD=D1=82=D0=B0=D0=B9=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../species/serpentids/code/mob/serpentids.dm | 2 +- modular_ss220/text_to_speech/code/tts_atom.dm | 15 --------------- .../text_to_speech/code/tts_component.dm | 9 +++++++++ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/modular_ss220/species/serpentids/code/mob/serpentids.dm b/modular_ss220/species/serpentids/code/mob/serpentids.dm index 224c624d6573..19e741fc3204 100644 --- a/modular_ss220/species/serpentids/code/mob/serpentids.dm +++ b/modular_ss220/species/serpentids/code/mob/serpentids.dm @@ -143,7 +143,7 @@ var/limb_armor = limb.brute_dam + limb.burn_dam armor_count += limb_armor - if (gene_degradation) + if(gene_degradation) H.adjustCloneLoss(gene_degradation) gene_lastcall = 0 diff --git a/modular_ss220/text_to_speech/code/tts_atom.dm b/modular_ss220/text_to_speech/code/tts_atom.dm index 37e1134530d7..f90af41c3eba 100644 --- a/modular_ss220/text_to_speech/code/tts_atom.dm +++ b/modular_ss220/text_to_speech/code/tts_atom.dm @@ -29,18 +29,3 @@ /atom/proc/tts_trait_remove(trait) SEND_SIGNAL(src, COMSIG_ATOM_TTS_TRAIT_REMOVE, trait) - -/mob/add_language(language, force) - . = ..() - RegisterSignal(src, COMSIG_ATOM_PRE_TTS_CAST, PROC_REF(atom_pre_tts_cast_mob)) - -/mob/remove_language(rem_language, force) - . = ..() - UnregisterSignal(src, COMSIG_ATOM_PRE_TTS_CAST) - -/mob/proc/atom_pre_tts_cast_mob(atom, listener, message, location, is_local, effect, traits, preSFX, postSFX) - SIGNAL_HANDLER - for(var/datum/multilingual_say_piece/phrase in message) - if(phrase.speaking.no_tts) - return COMPONENT_TTS_INTERRUPT - return FALSE diff --git a/modular_ss220/text_to_speech/code/tts_component.dm b/modular_ss220/text_to_speech/code/tts_component.dm index fb1e6b620e33..ba544f217437 100644 --- a/modular_ss220/text_to_speech/code/tts_component.dm +++ b/modular_ss220/text_to_speech/code/tts_component.dm @@ -7,12 +7,14 @@ RegisterSignal(parent, COMSIG_ATOM_TTS_CAST, PROC_REF(cast_tts)) RegisterSignal(parent, COMSIG_ATOM_TTS_TRAIT_ADD, PROC_REF(tts_trait_add)) RegisterSignal(parent, COMSIG_ATOM_TTS_TRAIT_REMOVE, PROC_REF(tts_trait_remove)) + RegisterSignal(parent, COMSIG_ATOM_PRE_TTS_CAST, PROC_REF(atom_pre_tts_cast_mob)) /datum/component/tts_component/UnregisterFromParent() UnregisterSignal(parent, COMSIG_ATOM_TTS_SEED_CHANGE) UnregisterSignal(parent, COMSIG_ATOM_TTS_CAST) UnregisterSignal(parent, COMSIG_ATOM_TTS_TRAIT_ADD) UnregisterSignal(parent, COMSIG_ATOM_TTS_TRAIT_REMOVE) + UnregisterSignal(parent, COMSIG_ATOM_TTS_TRAIT_REMOVE) /datum/component/tts_component/Initialize(datum/tts_seed/new_tts_seed, ...) if(!isatom(parent)) @@ -198,6 +200,13 @@ if(!isnull(trait) && (trait in traits)) traits -= trait +/datum/component/tts_component/proc/atom_pre_tts_cast_mob(atom, listener, message, location, is_local, effect, traits, preSFX, postSFX) + SIGNAL_HANDLER + for(var/datum/multilingual_say_piece/phrase in message) + if(phrase.speaking?.no_tts) + return COMPONENT_TTS_INTERRUPT + return FALSE + // Component usage /client/create_response_team_part_1(new_gender, new_species, role, turf/spawn_location)