mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 05:27:39 +01:00
Merge pull request #1491 from Hubblenaut/morgue
Morgue Trays interface with occupant minds
This commit is contained in:
@@ -86,6 +86,17 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/body_bag/proc/get_occupants()
|
||||
var/list/occupants = list()
|
||||
for(var/mob/living/carbon/human/H in contents)
|
||||
occupants += H
|
||||
return occupants
|
||||
|
||||
/obj/structure/closet/body_bag/proc/update(var/broadcast=0)
|
||||
if(istype(loc, /obj/structure/morgue))
|
||||
var/obj/structure/morgue/M = loc
|
||||
M.update(broadcast)
|
||||
|
||||
/obj/structure/closet/body_bag/update_icon()
|
||||
if(opened)
|
||||
icon_state = icon_opened
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
dir = EAST
|
||||
density = 1
|
||||
var/obj/structure/m_tray/connected = null
|
||||
var/list/occupants = list()
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/morgue/Destroy()
|
||||
@@ -26,12 +27,28 @@
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/morgue/proc/update()
|
||||
/obj/structure/morgue/proc/get_occupants()
|
||||
occupants.Cut()
|
||||
for(var/mob/living/carbon/human/H in contents)
|
||||
occupants += H
|
||||
for(var/obj/structure/closet/body_bag/B in contents)
|
||||
occupants += B.get_occupants()
|
||||
|
||||
/obj/structure/morgue/proc/update(var/broadcast=0)
|
||||
if (src.connected)
|
||||
src.icon_state = "morgue0"
|
||||
else
|
||||
if (src.contents.len)
|
||||
src.icon_state = "morgue2"
|
||||
get_occupants()
|
||||
for (var/mob/living/carbon/human/H in occupants)
|
||||
if(H.isSynthetic() || H.suiciding || !H.ckey || !H.client || (NOCLONE in H.mutations) || (H.species && H.species.flags & NO_SCAN))
|
||||
src.icon_state = "morgue2"
|
||||
break
|
||||
else
|
||||
src.icon_state = "morgue3"
|
||||
if(broadcast)
|
||||
broadcast_medical_hud_message("[src] was able to establish a mental interface with occupant.", src)
|
||||
else
|
||||
src.icon_state = "morgue1"
|
||||
return
|
||||
|
||||
@@ -155,6 +155,12 @@ Works together with spawning an observer, noted above.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
|
||||
ghost.key = key
|
||||
if(istype(loc, /obj/structure/morgue))
|
||||
var/obj/structure/morgue/M = loc
|
||||
M.update()
|
||||
else if(istype(loc, /obj/structure/closet/body_bag))
|
||||
var/obj/structure/closet/body_bag/B = loc
|
||||
B.update()
|
||||
if(ghost.client)
|
||||
ghost.client.time_died_as_mouse = ghost.timeofdeath
|
||||
if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
@@ -224,6 +230,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
mind.current.ajourn=0
|
||||
mind.current.key = key
|
||||
mind.current.teleop = null
|
||||
if(istype(mind.current.loc, /obj/structure/morgue))
|
||||
var/obj/structure/morgue/M = mind.current.loc
|
||||
M.update(1)
|
||||
else if(istype(mind.current.loc, /obj/structure/closet/body_bag))
|
||||
var/obj/structure/closet/body_bag/B = mind.current.loc
|
||||
B.update(1)
|
||||
if(!admin_ghosted)
|
||||
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
|
||||
return 1
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 104 KiB |
Reference in New Issue
Block a user