mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
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 🆑 grungussuss sound: only the scream emote can be heard through walls /🆑
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user