fixes items spawning on top of closets rather than inside closets (#7361)

This commit is contained in:
deathride58
2018-07-20 06:41:34 -04:00
committed by kevinz000
parent 13a091f9a9
commit 6670284b62
@@ -36,11 +36,11 @@
/obj/structure/closet/Initialize(mapload)
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
addtimer(CALLBACK(src, .proc/take_contents), 0)
. = ..()
update_icon()
PopulateContents()
if(mapload && !opened)
take_contents()
//USE THIS TO FILL IT, NOT INITIALIZE OR NEW
/obj/structure/closet/proc/PopulateContents()
@@ -167,6 +167,8 @@
var/obj/item/I = AM
if (I.item_flags & NODROP)
return
else if(istype(AM, /obj/effect))
return
else if(!allow_objects && !istype(AM, /obj/effect/dummy/chameleon))
return
if(!allow_dense && AM.density)