diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index fc0fc143249..0ad8439d123 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -43,7 +43,7 @@ var/foldable_amt = 0 /// Lazy list of mobs which are currently viewing the storage inventory. - var/list/mobs_viewing + var/list/mobs_viewing /obj/item/storage/Initialize(mapload) . = ..() @@ -353,6 +353,14 @@ to_chat(usr, "[src] cannot hold [I].") return FALSE + if(length(cant_hold) && istype(I, /obj/item/storage)) //Checks nested storage contents for restricted objects, we don't want people sneaking the NAD in via boxes now, do we? + var/obj/item/storage/S = I + for(var/obj/A in S.return_inv()) + if(is_type_in_typecache(A, cant_hold)) + if(!stop_messages) + to_chat(usr, "[src] rejects [I] because of its contents.") + return FALSE + if(I.w_class > max_w_class) if(!stop_messages) to_chat(usr, "[I] is too big for [src].")