mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
committed by
Rob Bailey
parent
eb4a43cab5
commit
53952e7622
@@ -153,7 +153,7 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/split_personality/emote(act, m_type = null, message = null, intentional = FALSE)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
///////////////BRAINWASHING////////////////////
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
var/sound //Sound to play when emote is called
|
||||
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
|
||||
|
||||
/datum/emote/New()
|
||||
if (ispath(mob_type_allowed_typecache))
|
||||
@@ -75,6 +76,17 @@
|
||||
else
|
||||
user.visible_message(msg)
|
||||
|
||||
/// For handling emote cooldown, return true to allow the emote to happen
|
||||
/datum/emote/proc/check_cooldown(mob/user, intentional)
|
||||
if(!intentional)
|
||||
return TRUE
|
||||
if(user.emotes_used && user.emotes_used[src] + cooldown > world.time)
|
||||
return FALSE
|
||||
if(!user.emotes_used)
|
||||
user.emotes_used = list()
|
||||
user.emotes_used[src] = world.time
|
||||
return TRUE
|
||||
|
||||
/datum/emote/proc/get_sound(mob/living/user)
|
||||
return sound //by default just return this var.
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
|
||||
/datum/keybinding/emote/down(client/user)
|
||||
. = ..()
|
||||
user.mob.emote(emote_key)
|
||||
return user.mob.emote(emote_key, intentional=TRUE)
|
||||
|
||||
Reference in New Issue
Block a user