Mobs can die loudly again (#76580)

## About The Pull Request

Mobs would never emote or make sounds upon death because they set
themselves to "dead" before trying to run the emote and the emote can't
run while you are dead.

Also basic mobs didn't have the "it's dead" examine text, and should. 

## Why It's Good For The Game

It's good for mobs to tell you when they have died.
Multiple basic mobs were implemented with this feature and apparently
never tested? Maybe we just broke it recently.

## Changelog

🆑
fix: Mobs can once again emote (with sound) when they die.
fix: Basic mobs will tell you whether they are alive if you examine
them.
/🆑
This commit is contained in:
Jacquerel
2023-07-06 11:27:14 -06:00
committed by GitHub
parent eabe1e6f1f
commit 9904335a37
2 changed files with 9 additions and 3 deletions
+6
View File
@@ -170,6 +170,12 @@
lighting_color_cutoffs = list(lighting_cutoff_red, lighting_cutoff_green, lighting_cutoff_blue)
return ..()
/mob/living/basic/examine(mob/user)
. = ..()
if(stat != DEAD)
return
. += span_deadsay("Upon closer examination, [p_they()] appear[p_s()] to be [HAS_TRAIT(user.mind, TRAIT_NAIVE) ? "asleep" : "dead"].")
/mob/living/basic/proc/melee_attack(atom/target, list/modifiers)
face_atom(target)
if(SEND_SIGNAL(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, target) & COMPONENT_HOSTILE_NO_ATTACK)