Emotes now shatter 80% less immersions (#31240)

* Emote Checks by Default

* Removes emote argument

* More emote fixes

* Overhauled emote check

* Closed Spans
This commit is contained in:
Robustin
2017-10-05 16:10:47 -04:00
committed by CitadelStationBot
parent cf37555c4d
commit c8e5928517
2 changed files with 24 additions and 17 deletions
+6 -5
View File
@@ -42,7 +42,7 @@
I.trigger(key, L)
if(!msg)
return FALSE
return
user.log_message(msg, INDIVIDUAL_EMOTE_LOG)
msg = "<b>[user]</b> " + msg
@@ -91,21 +91,22 @@
/datum/emote/proc/select_param(mob/user, params)
return replacetext(message_param, "%t", params)
/datum/emote/proc/can_run_emote(mob/user, help_check)
/datum/emote/proc/can_run_emote(mob/user, status_check = TRUE)
. = TRUE
if(!is_type_in_typecache(user, mob_type_allowed_typecache))
return FALSE
if(is_type_in_typecache(user, mob_type_blacklist_typecache))
return FALSE
if(!help_check)
if(status_check)
if(user.stat > stat_allowed || (user.status_flags & FAKEDEATH))
to_chat(user, "<span class='notice'>You cannot [key] while unconscious.</span>")
return FALSE
if(restraint_check && user.restrained())
if(restraint_check && (user.restrained() || user.buckled))
to_chat(user, "<span class='notice'>You cannot [key] while restrained.</span>")
return FALSE
if(user.reagents && user.reagents.has_reagent("mimesbane"))
return FALSE
/datum/emote/sound
var/sound //Sound to play when emote is called
var/vary = FALSE //used for the honk borg emote