Fixes and refactors death examine code (#55907)

Examine death bodies should now display the correct text
Changed the logic so that the message tells you if the players is:

- Still in his body (`[t_He] [t_is] limp and unresponsive; there are no signs of life...`) or
- A ghost that could enter the body again (`[t_He] [t_is] limp and unresponsive; there are no signs of life and [t_his] soul has departed, but the link is not yet fully broken...`) or
- No ghost, that can reenter the body and no key (`[t_He] [t_is] limp and unresponsive; there are no signs of life and [t_his] soul has lost the will to live...`)

Also refactored the code a bit:

- Moved the death examine message generation to a proc so that you can work with returns
- Removed pushed_do_not_resuscitate since its not needed this way
This commit is contained in:
Gamer025
2021-01-07 16:18:09 -03:00
committed by GitHub
parent 704a7465be
commit 37c23ef428
4 changed files with 16 additions and 13 deletions
@@ -22,7 +22,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
light_power = 2
light_on = FALSE
var/can_reenter_corpse
var/pushed_do_not_resuscitate = FALSE
var/datum/hud/living/carbon/hud = null // hud
var/bootime = 0
var/started_as_observer //This variable is set to 1 when you enter the game as an observer.
@@ -381,7 +380,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
can_reenter_corpse = FALSE
pushed_do_not_resuscitate = TRUE
// Update med huds
var/mob/living/carbon/current = mind.current
current.med_hud_set_status()