Files
VOREStation/code/game/objects/structures/crates_lockers/largecrate.dm
Arokha Sieyes f9b409549e Makes closets/crates like boxes
Gives them a 'starts_with' (well, renames the existing one. Someone ported it but never actually applied it anywhere).
2018-05-24 17:26:17 -04:00

84 lines
2.6 KiB
Plaintext

/obj/structure/largecrate
name = "large crate"
desc = "A hefty wooden crate."
icon = 'icons/obj/storage.dmi'
icon_state = "densecrate"
density = 1
var/list/starts_with
/obj/structure/largecrate/initialize()
. = ..()
if(starts_with)
create_objects_in_loc(src, starts_with)
starts_with = null
for(var/obj/I in src.loc)
if(I.density || I.anchored || I == src || !I.simulated)
continue
I.forceMove(src)
/obj/structure/largecrate/attack_hand(mob/user as mob)
user << "<span class='notice'>You need a crowbar to pry this open!</span>"
return
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/crowbar))
new /obj/item/stack/material/wood(src)
var/turf/T = get_turf(src)
for(var/atom/movable/AM in contents)
if(AM.simulated) AM.forceMove(T)
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
qdel(src)
else
return attack_hand(user)
/obj/structure/largecrate/mule
name = "MULE crate"
/obj/structure/largecrate/hoverpod
name = "\improper Hoverpod assembly crate"
desc = "It comes in a box for the fabricator's sake. Where does the wood come from? ... And why is it lighter?"
icon_state = "mulecrate"
/obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/crowbar))
var/obj/item/mecha_parts/mecha_equipment/ME
var/obj/mecha/working/hoverpod/H = new (loc)
ME = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
ME.attach(H)
ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
ME.attach(H)
..()
/obj/structure/largecrate/animal
icon_state = "mulecrate"
/obj/structure/largecrate/animal/mulebot
name = "Mulebot crate"
starts_with = list(/mob/living/bot/mulebot)
/obj/structure/largecrate/animal/corgi
name = "corgi carrier"
starts_with = list(/mob/living/simple_animal/corgi)
/obj/structure/largecrate/animal/cow
name = "cow crate"
starts_with = list(/mob/living/simple_animal/cow)
/obj/structure/largecrate/animal/goat
name = "goat crate"
starts_with = list(/mob/living/simple_animal/retaliate/goat)
/obj/structure/largecrate/animal/cat
name = "cat carrier"
starts_with = list(/mob/living/simple_animal/cat)
/obj/structure/largecrate/animal/cat/bones
starts_with = list(/mob/living/simple_animal/cat/fluff/bones)
/obj/structure/largecrate/animal/chick
name = "chicken crate"
starts_with = list(/mob/living/simple_animal/chick = 5)