Merge pull request #14128 from farie82/locker-creation-exploit-fix

Fixes the exploit where you can put unlimited items in a locker
This commit is contained in:
AffectedArc07
2020-08-21 23:04:02 +01:00
committed by GitHub
@@ -25,9 +25,13 @@
..()
spawn(1)
if(!opened) // if closed, any item at the crate's loc is put in the contents
var/itemcount = 0
for(var/obj/item/I in loc)
if(I.density || I.anchored || I == src) continue
I.forceMove(src)
// Ensure the storage cap is respected
if(++itemcount >= storage_capacity)
break
// Fix for #383 - C4 deleting fridges with corpses
/obj/structure/closet/Destroy()