mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 17:41:50 +00:00
Cardboard boxes are closets that: *Can only carry a single person *Are easy to destroy *Are flammable *Can't be welded shut They can also can be used for more "tactical" purposes, at the same speed as walking. Takes the opportunity to remove some object unfriendly coding. If this is accepted they'll be a pull a little later to replace a few closets on the maps with boxes (or maybe code to have generic closets on the map to occasionally spawn as boxes instead).
110 lines
3.2 KiB
Plaintext
110 lines
3.2 KiB
Plaintext
//Also contains /obj/structure/closet/body_bag because I doubt anyone would think to look for bodybags in /object/structures
|
|
|
|
/obj/item/bodybag
|
|
name = "body bag"
|
|
desc = "A folded bag designed for the storage and transportation of cadavers."
|
|
icon = 'icons/obj/bodybag.dmi'
|
|
icon_state = "bodybag_folded"
|
|
var/unfoldedbag_path = /obj/structure/closet/body_bag
|
|
w_class = 2
|
|
|
|
/obj/item/bodybag/attack_self(mob/user)
|
|
var/obj/structure/closet/body_bag/R = new unfoldedbag_path(user.loc)
|
|
R.add_fingerprint(user)
|
|
qdel(src)
|
|
|
|
|
|
/obj/item/weapon/storage/box/bodybags
|
|
name = "body bags"
|
|
desc = "The label indicates that it contains body bags."
|
|
icon_state = "bodybags"
|
|
|
|
/obj/item/weapon/storage/box/bodybags/New()
|
|
..()
|
|
new /obj/item/bodybag(src)
|
|
new /obj/item/bodybag(src)
|
|
new /obj/item/bodybag(src)
|
|
new /obj/item/bodybag(src)
|
|
new /obj/item/bodybag(src)
|
|
new /obj/item/bodybag(src)
|
|
new /obj/item/bodybag(src)
|
|
|
|
|
|
/obj/structure/closet/body_bag
|
|
name = "body bag"
|
|
desc = "A plastic bag designed for the storage and transportation of cadavers."
|
|
icon = 'icons/obj/bodybag.dmi'
|
|
icon_state = "bodybag"
|
|
var/foldedbag_path = /obj/item/bodybag
|
|
var/tagged = 0 // so closet code knows to put the tag overlay back
|
|
density = 0
|
|
mob_storage_capacity = 2
|
|
open_sound = 'sound/items/zip.ogg'
|
|
|
|
|
|
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
|
|
if (istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/toy/crayon))
|
|
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
|
|
if(user.get_active_hand() != I)
|
|
return
|
|
if(!in_range(src, user) && loc != user)
|
|
return
|
|
if(t)
|
|
name = "body bag - [t]"
|
|
tagged = 1
|
|
update_icon()
|
|
else
|
|
name = "body bag"
|
|
return
|
|
else if(istype(I, /obj/item/weapon/wirecutters))
|
|
user << "<span class='notice'>You cut the tag off [src].</span>"
|
|
name = "body bag"
|
|
tagged = 0
|
|
update_icon()
|
|
|
|
/obj/structure/closet/body_bag/update_icon()
|
|
..()
|
|
if (tagged)
|
|
overlays += "bodybag_label"
|
|
|
|
/obj/structure/closet/body_bag/close()
|
|
if(..())
|
|
density = 0
|
|
return 1
|
|
return 0
|
|
|
|
|
|
/obj/structure/closet/body_bag/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)
|
|
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)
|
|
qdel(src)
|
|
|
|
|
|
// Bluespace bodybag
|
|
|
|
/obj/item/bodybag/bluespace
|
|
name = "bluespace body bag"
|
|
desc = "A folded bluespace body bag designed for the storage and transportation of cadavers."
|
|
icon = 'icons/obj/bodybag.dmi'
|
|
icon_state = "bluebodybag_folded"
|
|
unfoldedbag_path = /obj/structure/closet/body_bag/bluespace
|
|
w_class = 2
|
|
|
|
/obj/structure/closet/body_bag/bluespace
|
|
name = "bluespace body bag"
|
|
desc = "A bluespace body bag designed for the storage and transportation of cadavers."
|
|
icon = 'icons/obj/bodybag.dmi'
|
|
icon_state = "bluebodybag"
|
|
foldedbag_path = /obj/item/bodybag/bluespace
|
|
density = 0
|
|
mob_storage_capacity = 15
|
|
max_mob_size = MOB_SIZE_LARGE |