From a631697f911c9ac94f0c0e6bf2fc2c97ac1727ac Mon Sep 17 00:00:00 2001 From: Artorp Date: Sat, 7 Feb 2015 03:58:20 +0100 Subject: [PATCH] Morgue Cleanup --- code/game/objects/structures/morgue.dm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index b3f49418ae8..1b0825f4f84 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -27,22 +27,16 @@ if(src.contents.len) var/mob/living/M = locate() in contents - + var/obj/structure/closet/body_bag/B = locate() in contents if(M==null) M = locate() in B if(M) - var/ghost_can_reenter_corpse = null - if (M.mind) - for(var/mob/dead/observer/G in player_list) //Does the corpse have a ghost? - if (G.mind == M.mind) - if (G.client && G.can_reenter_corpse) - ghost_can_reenter_corpse = 1 - break + var/mob/dead/observer/G = M.get_ghost() if(M.client) src.icon_state = "morgue3" - else if(M.mind && ghost_can_reenter_corpse) //There is a ghost and it is connected to the server + else if(G && G.client) //There is a ghost and it is connected to the server src.icon_state = "morgue5" else src.icon_state = "morgue2"