Skip to content

Commit

Permalink
Fix emoting past the grave (#6387)
Browse files Browse the repository at this point in the history
# 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
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/4dbc6375-93db-4f76-8765-c54cfca33294)

</details>


# Changelog
:cl: Drathek
fix: Fixed larva and hugger emotes performing no stat or muted or
cooldown checks
/:cl:
  • Loading branch information
Drulikar committed Jun 7, 2024
1 parent 0c2c300 commit 28409ec
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Larva.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 28409ec

Please sign in to comment.