diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index 084e1977b99..266a2ad862d 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -18,6 +18,7 @@ var/global/list/emote_list = list() var/muzzle_ignore = FALSE //Will only work if the emote is EMOTE_AUDIBLE var/list/mob_type_allowed_typecache = list() //Types that are allowed to use that emote var/list/mob_type_blacklist_typecache = list() //Types that are NOT allowed to use that emote + var/stat_allowed = CONSCIOUS /datum/emote/New() ..() @@ -79,7 +80,7 @@ var/global/list/emote_list = list() /datum/emote/proc/can_run_emote(mob/user) . = TRUE - if((user.stat && key != "deathgasp") || (user.status_flags & FAKEDEATH)) + if(user.stat > stat_allowed || (user.status_flags & FAKEDEATH)) return FALSE if(!is_type_in_typecache(user, mob_type_allowed_typecache)) return FALSE diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 259817722ff..04146038da1 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -78,10 +78,8 @@ . = ..() var/mob/living/carbon/human/H = user if(.) - world << ". if" H.startTailWag() else - world << "end" H.endTailWag() /datum/emote/living/carbon/human/wag/can_run_emote(mob/user) @@ -105,11 +103,12 @@ /datum/emote/living/carbon/human/wing/run_emote(mob/user, params) . = ..() - var/mob/living/carbon/human/H = user - if(findtext(select_message_type(user), "open")) - H.OpenWings() - else - H.CloseWings() + if(.) + var/mob/living/carbon/human/H = user + if(findtext(select_message_type(user), "open")) + H.OpenWings() + else + H.CloseWings() /datum/emote/living/carbon/human/wing/select_message_type(mob/user) . = ..() @@ -155,7 +154,6 @@ update_body() /mob/living/carbon/human/proc/OpenWings() - world << "open wings being called" if(!dna || !dna.species) return if("wings" in dna.species.mutant_bodyparts) @@ -164,7 +162,6 @@ update_body() /mob/living/carbon/human/proc/CloseWings() - world << "close wings being called" if(!dna || !dna.species) return if("wingsopen" in dna.species.mutant_bodyparts) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 280415ec1f1..951def745c3 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -18,11 +18,6 @@ mob_type_allowed_typecache = list(/mob/living) mob_type_blacklist_typecache = list(/mob/living/simple_animal/slime, /mob/living/brain) -/datum/emote/living/aflap - key = "aflap" - message = "flaps their wings ANGRILY!" - restraint_check = TRUE - /datum/emote/living/blush key = "blush" key_third_person = "blushes" @@ -65,7 +60,8 @@ /datum/emote/living/collapse/run_emote(mob/user, params) . = ..() - user.Paralyse(2) + if(.) + user.Paralyse(2) /datum/emote/living/cough key = "cough" @@ -113,14 +109,26 @@ key_third_person = "flaps" message = "flaps their wings." restraint_check = TRUE + var/wing_time = 20 /datum/emote/living/flap/run_emote(mob/user, params) . = ..() if(ishuman(user)) var/mob/living/carbon/human/H = user - if((H.dna.features["wings"] != "None") && !("wings" in H.dna.species.mutant_bodyparts)) - H.OpenWings() - addtimer(H, "CloseWings", 20) + var/open = FALSE + if(H.dna.features["wings"] != "None") + if("wingsopen" in H.dna.species.mutant_bodyparts) + open = TRUE + H.CloseWings() + else + H.OpenWings() + addtimer(H, "[open ? "Open" : "Close"]Wings", wing_time) + +/datum/emote/living/flap/aflap + key = "aflap" + key_third_person = "aflaps" + message = "flaps their wings ANGRILY!" + wing_time = 10 /datum/emote/living/flip key = "flip" @@ -128,7 +136,7 @@ /datum/emote/living/flip/run_emote(mob/user, params) . = ..() - if(!user.restrained() || !user.sleeping) + if(!user.sleeping) user.SpinAnimation(7,1) /datum/emote/living/frown