[MIRROR] [READY] Fixes de-initialization of cleanables-ash (#5295)

* [READY] Fixes de-initialization of cleanables-ash

* Update morgue.dm

* Update morgue.dm
This commit is contained in:
CitadelStationBot
2018-02-05 03:20:09 -06:00
committed by Poojawa
parent 9b453dfd35
commit d4c270fe4a
3 changed files with 8 additions and 7 deletions
@@ -17,6 +17,10 @@
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/effect/decal/cleanable/ash/crematorium
//crematoriums need their own ash cause default ash deletes itself if created in an obj
turf_loc_check = FALSE
/obj/effect/decal/cleanable/ash/large
name = "large pile of ashes"
icon_state = "big_ash"
+2 -1
View File
@@ -2,10 +2,11 @@
name = "decal"
anchored = TRUE
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/turf_loc_check = TRUE
/obj/effect/decal/Initialize()
. = ..()
if(!isturf(loc) || NeverShouldHaveComeHere(loc))
if(turf_loc_check && (!isturf(loc) || NeverShouldHaveComeHere(loc)))
return INITIALIZE_HINT_QDEL
/obj/effect/decal/blob_act(obj/structure/blob/B)
+2 -6
View File
@@ -241,15 +241,11 @@ GLOBAL_LIST_EMPTY(crematoriums)
M.ghostize()
qdel(M)
var/ash_check = FALSE
for(var/obj/O in conts) //conts defined above, ignores crematorium and tray
if(istype(O,/obj/effect/decal/cleanable/ash)) ash_check = TRUE//creates the illusion of ash piling up
qdel(O)
var/obj/effect/decal/cleanable/ash/a
if(ash_check) a=new/obj/effect/decal/cleanable/ash/large(src)//cont. illusion of more ash
else a=new/obj/effect/decal/cleanable/ash(src)
a.layer = connected.layer//Makes the ash the same layer as the tray.
if(!locate(/obj/effect/decal/cleanable/ash) in get_step(src, dir))//prevent pile-up
new/obj/effect/decal/cleanable/ash/crematorium(src)
sleep(30)