From a749b3428358af19afb08164729343825425d752 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:53:05 +0300 Subject: [PATCH] [MIRROR] sec-hailers no longer apply filters on TTS when pushed out of the way. (#2085) * sec-hailers no longer apply filters on TTS when pushed out of the way. (#81569) ## About The Pull Request Previously, pushing the mask out of the way did not prevent TTS from being filtered. ## Why It's Good For The Game If the mask isn't in the way, it shouldn't do that. Simple as that. * sec-hailers no longer apply filters on TTS when pushed out of the way. --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/clothing/masks/_masks.dm | 1 + code/modules/clothing/masks/gasmask.dm | 1 + code/modules/mob/living/living_say.dm | 11 ++++++----- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index 0bcd0e14382..23fc2272229 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -8,6 +8,7 @@ strip_delay = 40 equip_delay_other = 40 var/modifies_speech = FALSE + ///Whether the mask is pushed out of the food hole or not. var/mask_adjusted = FALSE var/adjusted_flags = null ///Did we install a filtering cloth? diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 8026479d6f9..f83ca793aeb 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -29,6 +29,7 @@ GLOBAL_LIST_INIT(clown_mask_options, list( ///Cigarette in the mask var/obj/item/clothing/mask/cigarette/cig voice_filter = "lowpass=f=750,volume=2" + /datum/armor/mask_gas bio = 100 diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index cfb49410baf..22f4b244324 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -409,11 +409,12 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list( var/mob/living/carbon/human/human_speaker = src if(istype(human_speaker.wear_mask, /obj/item/clothing/mask)) var/obj/item/clothing/mask/worn_mask = human_speaker.wear_mask - if(worn_mask.voice_override) - voice_to_use = worn_mask.voice_override - if(worn_mask.voice_filter) - filter += worn_mask.voice_filter - use_radio = worn_mask.use_radio_beeps_tts + if(!worn_mask.mask_adjusted) + if(worn_mask.voice_override) + voice_to_use = worn_mask.voice_override + if(worn_mask.voice_filter) + filter += worn_mask.voice_filter + use_radio = worn_mask.use_radio_beeps_tts if(use_radio) special_filter += TTS_FILTER_RADIO if(issilicon(src))