From 28409ec280209c5bfbdf09d88597917bffba1fc6 Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Fri, 7 Jun 2024 04:09:05 -0700 Subject: [PATCH] Fix emoting past the grave (#6387) # About the pull request This PR fixes the lack of stat, muted, and cooldown checks for larva and facehugger emotes. # Explain why it's good for the game Something that is dead shouldn't be emoting. # Testing Photographs and Procedure
Screenshots & Videos ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/4dbc6375-93db-4f76-8765-c54cfca33294)
# Changelog :cl: Drathek fix: Fixed larva and hugger emotes performing no stat or muted or cooldown checks /:cl: --- .../living/carbon/xenomorph/castes/Facehugger.dm | 14 ++++++++++++++ .../mob/living/carbon/xenomorph/castes/Larva.dm | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm index d98e60fe2177..b5f8bdd17213 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm @@ -222,6 +222,20 @@ if(act == "me") return ..() + switch(stat) + if(UNCONSCIOUS) + to_chat(src, SPAN_WARNING("You cannot emote while unconscious!")) + return FALSE + if(DEAD) + to_chat(src, SPAN_WARNING("You cannot emote while dead!")) + return FALSE + if(client) + if(client.prefs.muted & MUTE_IC) + to_chat(src, SPAN_DANGER("You cannot emote (muted).")) + return FALSE + if(!client.attempt_talking()) + return FALSE + // Otherwise, ""roar""! playsound(loc, "alien_roar_larva", 15) return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Larva.dm b/code/modules/mob/living/carbon/xenomorph/castes/Larva.dm index c06b8c43839d..a3e856c7fc67 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Larva.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Larva.dm @@ -160,6 +160,20 @@ if(act == "me") return ..() + switch(stat) + if(UNCONSCIOUS) + to_chat(src, SPAN_WARNING("You cannot emote while unconscious!")) + return FALSE + if(DEAD) + to_chat(src, SPAN_WARNING("You cannot emote while dead!")) + return FALSE + if(client) + if(client.prefs.muted & MUTE_IC) + to_chat(src, SPAN_DANGER("You cannot emote (muted).")) + return FALSE + if(!client.attempt_talking()) + return FALSE + // Otherwise, ""roar""! playsound(loc, "alien_roar_larva", 15) return TRUE