diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index 9029f6c4e56..57660368c63 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -50,7 +50,7 @@ var/stat_allowed = CONSCIOUS /// Sound to play when emote is called. var/sound - /// Used for the honk borg emote. + /// Does this emote vary in pitch? var/vary = FALSE /// Can only code call this event instead of the player. var/only_forced_audio = FALSE @@ -58,8 +58,10 @@ var/cooldown = 0.8 SECONDS /// Does this message have a message that can be modified by the user? 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 + /// How long is the shared emote cooldown triggered by this emote? + var/general_emote_audio_cooldown = 2 SECONDS + /// How long is the specific emote cooldown triggered by this emote? + var/specific_emote_audio_cooldown = 5 SECONDS /// Does this emote's sound ignore walls? var/sound_wall_ignore = FALSE @@ -100,15 +102,10 @@ user.log_message(msg, LOG_EMOTE) var/tmp_sound = get_sound(user) - if(tmp_sound && should_play_sound(user, intentional) && TIMER_COOLDOWN_FINISHED(user, "audible_emote_cooldown")) - TIMER_COOLDOWN_START(user, "audible_emote_cooldown", audio_cooldown) - //SKYRAT EDIT CHANGE BEGIN - //playsound(source = user,soundin = tmp_sound,vol = 50, vary = vary, ignore_walls = sound_wall_ignore) - SKYRAT EDIT - ORIGINAL - if(istype(src, /datum/emote/living/lewd)) - conditional_pref_sound(user, tmp_sound, sound_volume, vary, pref_to_check = /datum/preference/toggle/erp/sounds) - else - playsound(source = user, soundin = tmp_sound, vol = sound_volume, vary = vary, ignore_walls = sound_wall_ignore) - //SKYRAT EDIT CHANGE END + if(tmp_sound && should_play_sound(user, intentional) && TIMER_COOLDOWN_FINISHED(user, "general_emote_audio_cooldown") && TIMER_COOLDOWN_FINISHED(user, type)) + TIMER_COOLDOWN_START(user, type, specific_emote_audio_cooldown) + TIMER_COOLDOWN_START(user, "general_emote_audio_cooldown", general_emote_audio_cooldown) + 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/carbon/emote.dm b/code/modules/mob/living/carbon/emote.dm index cc1043587a2..d32b146d0cb 100644 --- a/code/modules/mob/living/carbon/emote.dm +++ b/code/modules/mob/living/carbon/emote.dm @@ -24,7 +24,6 @@ message = "claps." hands_use_check = TRUE emote_type = EMOTE_AUDIBLE | EMOTE_VISIBLE - audio_cooldown = 5 SECONDS vary = TRUE /datum/emote/living/carbon/clap/get_sound(mob/living/user) @@ -57,7 +56,6 @@ key_third_person = "cries" message = "cries." message_mime = "sobs silently." - audio_cooldown = 5 SECONDS emote_type = EMOTE_AUDIBLE | EMOTE_VISIBLE vary = TRUE stat_allowed = SOFT_CRIT diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 334eb5f66ef..e725b867982 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -63,7 +63,7 @@ message = "screams!" message_mime = "acts out a scream!" emote_type = EMOTE_AUDIBLE | EMOTE_VISIBLE - audio_cooldown = 5 SECONDS + specific_emote_audio_cooldown = 10 SECONDS vary = TRUE /datum/emote/living/carbon/human/scream/can_run_emote(mob/user, status_check = TRUE , intentional, params) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 3df2b8772b9..2b180b804ad 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -263,7 +263,7 @@ message = "laughs." message_mime = "laughs silently!" emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE - audio_cooldown = 5 SECONDS + specific_emote_audio_cooldown = 8 SECONDS vary = TRUE /datum/emote/living/laugh/can_run_emote(mob/living/user, status_check = TRUE , intentional, params) @@ -312,7 +312,6 @@ message = "sneezes." message_mime = "acts out an exaggerated silent sneeze." emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE - audio_cooldown = 5 SECONDS vary = TRUE /datum/emote/living/sneeze/get_sound(mob/living/carbon/human/user) @@ -326,7 +325,6 @@ message = "coughs!" message_mime = "acts out an exaggerated cough!" vary = TRUE - audio_cooldown = 5 SECONDS emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE | EMOTE_RUNECHAT /datum/emote/living/cough/can_run_emote(mob/user, status_check = TRUE , intentional, params) @@ -744,7 +742,6 @@ key_third_person = "whistles" message = "whistles." message_mime = "whistles silently!" - audio_cooldown = 5 SECONDS vary = TRUE emote_type = EMOTE_AUDIBLE | EMOTE_VISIBLE