diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index d3ebf9d8..11d00ff2 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -13,6 +13,7 @@ var/health = 100 var/lastbang var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate + var/mob_capacity = 2 //then open it in a populated area to crash clients. /obj/structure/closet/New() @@ -80,6 +81,7 @@ return 0 var/itemcount = 0 + var/mobcount = 0 //Cham Projector Exception for(var/obj/effect/dummy/chameleon/AD in src.loc) @@ -103,6 +105,11 @@ if(M.buckled || M.pinned.len) continue + if(istype(M, /mob/living/carbon/human)) + if(mobcount >= mob_capacity) + continue + mobcount++ + if(M.client) M.client.perspective = EYE_PERSPECTIVE M.client.eye = src