mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Bluespace body bags of holding
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user