Morgue/Crematorium Update

This commit is contained in:
ZomgPonies
2013-12-29 13:25:31 -05:00
parent 4069f0a063
commit ae3ff027a9
3 changed files with 45 additions and 11 deletions
+27 -11
View File
@@ -15,21 +15,32 @@
desc = "Used to keep bodies in untill someone fetches them."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "morgue1"
dir = EAST
density = 1
var/obj/structure/m_tray/connected = null
anchored = 1.0
/obj/structure/morgue/proc/update()
if (src.connected)
if(src.connected)
src.icon_state = "morgue0"
else
if (src.contents.len)
src.icon_state = "morgue2"
else
src.icon_state = "morgue1"
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)
if(M.client)
src.icon_state = "morgue3"
else
src.icon_state = "morgue2"
else src.icon_state = "morgue4"
else src.icon_state = "morgue1"
return
/obj/structure/morgue/ex_act(severity)
switch(severity)
if(1.0)
@@ -71,16 +82,15 @@
else
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
src.connected = new /obj/structure/m_tray( src.loc )
step(src.connected, src.dir)
step(src.connected, EAST)
src.connected.layer = OBJ_LAYER
var/turf/T = get_step(src, src.dir)
var/turf/T = get_step(src, EAST)
if (T.contents.Find(src.connected))
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
src.connected.icon_state = "morguet"
src.connected.dir = src.dir
else
//src.connected = null
del(src.connected)
@@ -134,7 +144,7 @@
density = 1
layer = 2.0
var/obj/structure/morgue/connected = null
anchored = 1
anchored = 1.0
throwpass = 1
/obj/structure/m_tray/attack_paw(mob/user as mob)
@@ -159,6 +169,8 @@
return
if (!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
if (user != O)
for(var/mob/B in viewers(user, 3))
@@ -314,6 +326,7 @@
cremating = 1
locked = 1
icon_state = "cremate_active"
for(var/mob/living/M in contents)
if (M.stat!=2)
@@ -333,6 +346,7 @@
sleep(30)
cremating = 0
locked = 0
update()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
return
@@ -348,7 +362,7 @@
density = 1
layer = 2.0
var/obj/structure/crematorium/connected = null
anchored = 1
anchored = 1.0
throwpass = 1
/obj/structure/c_tray/attack_paw(mob/user as mob)
@@ -373,6 +387,8 @@
return
if (!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
if (user != O)
for(var/mob/B in viewers(user, 3))
@@ -23,6 +23,7 @@
universal_speak = 1
var/atom/movable/following = null
var/medHUD = 0
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER
@@ -218,6 +219,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Ghost"
set desc = "Relinquish your life and enter the land of the dead."
var/mob/M = src
if(stat == DEAD)
ghostize(1)
else
@@ -226,8 +229,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
resting = 1
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
var/obj/structure/morgue/Morgue = locate() in M.loc
if(istype(M.loc,/obj/structure/morgue))
Morgue = M.loc
if(Morgue)
Morgue.update()
return
/mob/dead/observer/Move(NewLoc, direct)
dir = direct
if(NewLoc)
@@ -294,6 +305,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
mind.current.ajourn=0
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()
return 1
/mob/dead/observer/verb/toggle_medHUD()