mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
[MIRROR] Added audio cooldown for emotes TAKE 2 (#6158)
* Added audio cooldown for emotes TAKE 2 * Mirror! Co-authored-by: ModDownloading <dsodium92@gmail.com> Co-authored-by: Funce <funce.973@gmail.com>
This commit is contained in:
@@ -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 = "<b>[user]</b> [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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user