Morgue tray now updates properly (#23109)

* Morgue tray now updates properly

* Return of the guard clause

* Send signal upon ghosting/reentering

* Correct source for reenter corpse signal

* Signals split up, now works with DNR

---------

Co-authored-by: Adrer <adrermail@gmail.com>
This commit is contained in:
Adrer
2023-11-03 20:22:47 +01:00
committed by GitHub
parent 1526f3b3ed
commit aa7ea39f48
4 changed files with 40 additions and 21 deletions
@@ -241,13 +241,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
// Respawnable
ghostize(1)
// If mob in morgue tray, update tray
var/obj/structure/morgue/Morgue = locate() in M.loc
if(istype(M.loc, /obj/structure/morgue))
Morgue = M.loc
if(Morgue)
Morgue.update_state()
// If mob in cryopod, despawn mob
if(P)
if(!P.control_computer)
@@ -303,11 +296,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
mind.current.key = key
var/obj/structure/morgue/Morgue = locate() in mind.current.loc
if(istype(mind.current.loc,/obj/structure/morgue))
Morgue = mind.current.loc
if(Morgue)
Morgue.update_state()
SEND_SIGNAL(mind.current, COMSIG_LIVING_REENTERED_BODY)
return 1
@@ -410,6 +399,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
can_reenter_corpse = FALSE
if(!QDELETED(mind.current)) // Could change while they're choosing
mind.current.remove_status_effect(STATUS_EFFECT_REVIVABLE)
SEND_SIGNAL(mind.current, COMSIG_LIVING_SET_DNR)
/mob/dead/observer/proc/dead_tele()
set category = "Ghost"
+1
View File
@@ -59,6 +59,7 @@
if(.)
if(ranged_ability && prev_client)
ranged_ability.remove_mousepointer(prev_client)
SEND_SIGNAL(src, COMSIG_LIVING_GHOSTIZED)
/mob/living/proc/OpenCraftingMenu()
return