diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm
index 455ec0f62a..88e6148c5f 100644
--- a/code/datums/emotes.dm
+++ b/code/datums/emotes.dm
@@ -42,7 +42,7 @@
I.trigger(key, L)
if(!msg)
- return FALSE
+ return
user.log_message(msg, INDIVIDUAL_EMOTE_LOG)
msg = "[user] " + 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, "You cannot [key] while unconscious.")
return FALSE
- if(restraint_check && user.restrained())
+ if(restraint_check && (user.restrained() || user.buckled))
+ to_chat(user, "You cannot [key] while restrained.")
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
diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm
index 9f31c5b055..bbe02a3f8e 100644
--- a/code/modules/mob/living/emote.dm
+++ b/code/modules/mob/living/emote.dm
@@ -29,6 +29,7 @@
key_third_person = "bows"
message = "bows."
message_param = "bows to %t."
+ restraint_check = TRUE
/datum/emote/living/burp
key = "burp"
@@ -119,6 +120,7 @@
key = "flap"
key_third_person = "flaps"
message = "flaps their wings."
+ restraint_check = TRUE
var/wing_time = 20
/datum/emote/living/flap/run_emote(mob/user, params)
@@ -138,6 +140,7 @@
key = "aflap"
key_third_person = "aflaps"
message = "flaps their wings ANGRILY!"
+ restraint_check = TRUE
wing_time = 10
/datum/emote/living/flip
@@ -147,7 +150,7 @@
/datum/emote/living/flip/run_emote(mob/user, params)
. = ..()
- if(!.)
+ if(.)
user.SpinAnimation(7,1)
/datum/emote/living/frown
@@ -454,7 +457,7 @@
if(e in keys)
continue
E = emote_list[e]
- if(E.can_run_emote(user, TRUE))
+ if(E.can_run_emote(user, status_check = FALSE))
keys += E.key
keys = sortList(keys)
@@ -481,18 +484,21 @@
/datum/emote/living/spin
key = "spin"
key_third_person = "spins"
+ restraint_check = TRUE
/datum/emote/living/spin/run_emote(mob/user)
- user.spin(20, 1)
- if(iscyborg(user))
- var/mob/living/silicon/robot/R = user
- if(R.buckled_mobs)
- for(var/mob/M in R.buckled_mobs)
- if(R.riding_datum)
- R.riding_datum.force_dismount(M)
- else
- R.unbuckle_all_mobs()
- ..()
+ . = ..()
+ if(.)
+ user.spin(20, 1)
+ if(iscyborg(user))
+ var/mob/living/silicon/robot/R = user
+ if(R.buckled_mobs)
+ for(var/mob/M in R.buckled_mobs)
+ if(R.riding_datum)
+ R.riding_datum.force_dismount(M)
+ else
+ R.unbuckle_all_mobs()
+
/datum/emote/living/circle
key = "circle"