Bluespace body bags of holding

This commit is contained in:
Xhuis
2017-01-25 08:52:16 -05:00
parent 6d639219e1
commit fcdb52c7e0
2 changed files with 58 additions and 1 deletions
@@ -67,4 +67,26 @@
icon_state = "bluebodybag"
foldedbag_path = /obj/item/bodybag/bluespace
mob_storage_capacity = 15
max_mob_size = MOB_SIZE_LARGE
max_mob_size = MOB_SIZE_LARGE
/obj/structure/closet/body_bag/bluespace/MouseDrop(over_object, src_location, over_location)
..()
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
if(!ishuman(usr))
return 0
if(opened)
return 0
if(contents.len >= mob_storage_capacity / 2)
usr << "<span class='warning'>There are too many things inside of [src] to fold it up!</span>"
return 0
for(var/obj/item/bodybag/bluespace/B in src)
usr << "<span class='warning'>You can't recursively fold bluespace body bags!</span>" //Nice try
return 0
visible_message("<span class='notice'>[usr] folds up [src].</span>")
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
usr.put_in_hands(B)
for(var/atom/movable/A in contents)
A.forceMove(B)
if(isliving(A))
A << "<span class='userdanger'>You're suddenly forced into a tiny, compressed space!</span>"
qdel(src)