From 456effbeae583ec0c2f148e61d4a09a622b16f5c Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 20 Jul 2024 18:14:01 +0200 Subject: [PATCH] [MIRROR] [NO GBP] megaphone tts actually works now. (#28952) * [NO GBP] megaphone tts actually works now. (#85031) ## About The Pull Request At some point, I've added the spam check to the PR, without thinking the var was being set by other comsig proc runs before the TTS one. ## Why It's Good For The Game I WANNA BE LOUD AND FUNNY! ## Changelog :cl: fix: fixed megaphone tts filter. /:cl: * [NO GBP] megaphone tts actually works now. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com> --- code/game/objects/items/devices/megaphone.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 0f9cf299ec2..718f3ac7219 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -35,7 +35,6 @@ to_chat(user, span_warning("\The [src] needs to recharge!")) else playsound(loc, 'sound/items/megaphone.ogg', 100, FALSE, TRUE) - spamcheck = world.time + 5 SECONDS speech_args[SPEECH_SPANS] |= voicespan /obj/item/megaphone/proc/add_tts_filter(mob/living/carbon/user, list/message_args) @@ -44,6 +43,7 @@ return if(spamcheck > world.time) return + spamcheck = world.time + 5 SECONDS if(obj_flags & EMAGGED) ///somewhat compressed and ear-grating, crusty and noisy with a bit of echo. message_args[TREAT_TTS_FILTER_ARG] += "acrusher=samples=9:level_out=7,aecho=delays=100:decays=0.4,aemphasis=type=emi,crystalizer=i=6,acontrast=60,rubberband=pitch=0.9"