mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Gives audible emotes an emote specific audio cooldown alongside the general audio cooldown (#87210)
## About The Pull Request defaults: ```php /// 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 ``` specific cooldown only checks for the emote, while the general is a shared cooldown, gave laugh and scream longer specific cooldowns. ## Why It's Good For The Game The general emote cooldown fixed the problem of multiple emotes getting used at once, now we have a problem with people using the same emote too many times, I want to give the players ability to use sounds in their emotes, but spamming the same emote over and over again makes me regret it and hesitant about it, this way we can have the best of both worlds. ## Changelog 🆑 grungussuss sound: along with the shared emote cooldown, specific emote audio cooldown has returned. /🆑 # Conflicts: # code/datums/emotes.dm
This commit is contained in:
committed by
lessthanthree
parent
1ad2c2b3d2
commit
932d5cd825
+9
-12
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user