Add cooldown to chirp emote

This commit is contained in:
Markolie
2015-09-30 03:04:15 +02:00
parent 0034a8a116
commit 8d99c8c689
2 changed files with 12 additions and 4 deletions
@@ -17,8 +17,6 @@
if (I.implanted)
I.trigger(act, src)
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
@@ -42,7 +40,6 @@
if(on_CD == 1) // Check if we need to suppress the emote attempt.
return // Suppress emote, you're still cooling off.
//--FalseIncarnate
switch(act)
if("me") //OKAY SO RANT TIME, THIS FUCKING HAS TO BE HERE OR A SHITLOAD OF THINGS BREAK
@@ -249,7 +249,18 @@
return
/mob/living/simple_animal/diona/emote(var/act, var/m_type=1, var/message = null)
if(stat) return
if(stat)
return
var/on_CD = 0
switch(act)
if("chirp")
on_CD = handle_emote_CD()
else
on_CD = 0
if(on_CD == 1)
return
switch(act) //IMPORTANT: Emotes MUST NOT CONFLICT anywhere along the chain.
if("chirp")