mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Lawgiver and random fix (#1658)
Fixes an issue that popped up with obj/randoms, they werent getting sucked into lockers Also fixes that lawgiver runtime. The issue that previous fixes miss is that DM casts implicitly and without safety checks. Casting an animal to a human does not result in null. an istype check is needed
This commit is contained in:
@@ -27,8 +27,9 @@
|
||||
/obj/structure/closet/initialize()
|
||||
..()
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
var/obj/item/I
|
||||
var/obj/I
|
||||
for(I in src.loc)
|
||||
if (!istype(I, /obj/item) && !istype(I, /obj/random))continue
|
||||
if(I.density || I.anchored || I == src) continue
|
||||
I.forceMove(src)
|
||||
// adjust locker size to hold all items with 5 units of free store room
|
||||
|
||||
Reference in New Issue
Block a user