From 2c36cbc6a4d2f0fd79e0e40420822a366e2b3300 Mon Sep 17 00:00:00 2001 From: grungussuss <96586172+Sadboysuss@users.noreply.github.com> Date: Sat, 27 Jul 2024 22:30:23 +0300 Subject: [PATCH] Emotes by default will not be heard through walls (#85245) ## About The Pull Request Added a var to emotes for ignoring walls when playing their sound, now only the scream emote can ignore walls. ## Why It's Good For The Game It's really annoying and stupid that you can hear people crying through walls and doesn't make sense at all. ## Changelog :cl: grungussuss sound: only the scream emote can be heard through walls /:cl: --- code/datums/emotes.dm | 4 +++- code/modules/mob/living/emote.dm | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index 331e11afa48..8d77c6fc6bd 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -60,6 +60,8 @@ var/can_message_change = FALSE /// How long is the cooldown on the audio of the emote, if it has one? var/audio_cooldown = 2 SECONDS + /// Does this emote's sound ignore walls? + var/sound_wall_ignore = FALSE /datum/emote/New() switch(mob_type_allowed_typecache) @@ -100,7 +102,7 @@ var/tmp_sound = get_sound(user) if(tmp_sound && should_play_sound(user, intentional) && TIMER_COOLDOWN_FINISHED(user, type)) TIMER_COOLDOWN_START(user, type, audio_cooldown) - playsound(user, tmp_sound, 50, vary) + playsound(source = user,soundin = tmp_sound,vol = 50, vary = vary, ignore_walls = sound_wall_ignore) var/is_important = emote_type & EMOTE_IMPORTANT var/is_visual = emote_type & EMOTE_VISIBLE diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 418b07ebf26..b007da827da 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -352,6 +352,7 @@ message_mime = "acts out a scream!" emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE mob_type_blacklist_typecache = list(/mob/living/brain, /mob/living/carbon/human) + sound_wall_ignore = TRUE /datum/emote/living/scream/run_emote(mob/user, params, type_override, intentional = FALSE) if(!intentional && HAS_TRAIT(user, TRAIT_ANALGESIA))