diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index d4a2f1460b7..c60fa6087a5 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -25,6 +25,7 @@ var/vary = FALSE //used for the honk borg emote var/only_forced_audio = FALSE //can only code call this event instead of the player. var/cooldown = 0.8 SECONDS + var/audio_cooldown = 2 SECONDS //SKYRAT EDIT ADDITION BEGIN - EMOTES var/sound_volume = 25 //Emote volume var/list/allowed_species @@ -66,7 +67,8 @@ var/dchatmsg = "[user] [msg]" var/tmp_sound = get_sound(user) - if(tmp_sound && (!only_forced_audio || !intentional)) + if(tmp_sound && (!only_forced_audio || !intentional) && !TIMER_COOLDOWN_CHECK(user, type)) + TIMER_COOLDOWN_START(user, type, audio_cooldown) //SKYRAT EDIT CHANGE BEGIN //playsound(user, tmp_sound, 50, vary) - SKYRAT EDIT - ORIGINAL playsound(user, tmp_sound, sound_volume, vary) diff --git a/code/modules/mob/living/carbon/emote.dm b/code/modules/mob/living/carbon/emote.dm index 04a7ac827f5..ed3597fa622 100644 --- a/code/modules/mob/living/carbon/emote.dm +++ b/code/modules/mob/living/carbon/emote.dm @@ -24,6 +24,7 @@ muzzle_ignore = TRUE hands_use_check = TRUE emote_type = EMOTE_AUDIBLE + audio_cooldown = 5 SECONDS vary = TRUE /datum/emote/living/carbon/clap/get_sound(mob/living/user) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 0197c569552..15bb2b8f0be 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -225,6 +225,7 @@ message = "laughs." message_mime = "laughs silently!" emote_type = EMOTE_AUDIBLE + audio_cooldown = 5 SECONDS vary = TRUE /datum/emote/living/laugh/can_run_emote(mob/living/user, status_check = TRUE , intentional) diff --git a/modular_skyrat/modules/emotes/code/emotes.dm b/modular_skyrat/modules/emotes/code/emotes.dm index e4b60a303c1..08c3d2aeb93 100644 --- a/modular_skyrat/modules/emotes/code/emotes.dm +++ b/modular_skyrat/modules/emotes/code/emotes.dm @@ -240,9 +240,10 @@ key = "clap" key_third_person = "claps" message = "claps." - emote_type = EMOTE_AUDIBLE muzzle_ignore = TRUE hands_use_check = TRUE + emote_type = EMOTE_AUDIBLE + audio_cooldown = 5 SECONDS vary = TRUE mob_type_allowed_typecache = list(/mob/living/carbon, /mob/living/silicon/pai) @@ -463,7 +464,7 @@ vary = TRUE sound = 'modular_skyrat/modules/emotes/sound/voice/moo.ogg' -/datum/emote/living/honk +/datum/emote/living/honk key = "honk1" key_third_person = "honks loudly like a goose!" message = "honks loudly like a goose!" diff --git a/modular_skyrat/modules/emotes/code/laugh_emotes.dm b/modular_skyrat/modules/emotes/code/laugh_emotes.dm index ce029e663d6..5c202afeaad 100644 --- a/modular_skyrat/modules/emotes/code/laugh_emotes.dm +++ b/modular_skyrat/modules/emotes/code/laugh_emotes.dm @@ -4,6 +4,7 @@ message = "laughs." message_mime = "laughs silently!" emote_type = EMOTE_AUDIBLE + audio_cooldown = 5 SECONDS vary = TRUE mob_type_allowed_typecache = list(/mob/living/carbon, /mob/living/silicon/pai)