Files
Yogstation/code/game/objects/structures/crates_lockers/crates.dm
Robustin 7db828644c EngiMarket Part Four - Ranged RCD and Rapid Lighting Device (RLD) (#25263)
Two new items, one brand new, the other an RCD that works at range without any other bells and whistles.

The RLD allows you to create floor and wall lighting along with temporary (they use fuel like flares) glowsticks at range. It can also deconstruct lights. The best part of this feature (besides the visual "ammo" updating icons) is the ability to select absolutely any color you desire.

🆑 Robustin
add: Ranged RCD added to the game
add: Rapid Lighting Device (also ranged) has been added. It can create wall, floor, and temporary lights of any color you desire.
/🆑
2017-04-14 09:31:43 +12:00

148 lines
4.7 KiB
Plaintext

/obj/structure/closet/crate
name = "crate"
desc = "A rectangular steel crate."
icon = 'icons/obj/crates.dmi'
icon_state = "crate"
req_access = null
can_weld_shut = FALSE
horizontal = TRUE
allow_objects = TRUE
allow_dense = TRUE
dense_when_open = TRUE
climbable = TRUE
climb_time = 10 //real fast, because let's be honest stepping into or onto a crate is easy
climb_stun = 0 //climbing onto crates isn't hard, guys
delivery_icon = "deliverycrate"
var/obj/item/weapon/paper/manifest/manifest
/obj/structure/closet/crate/New()
..()
update_icon()
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target, height=0)
if(!istype(mover, /obj/structure/closet))
var/obj/structure/closet/crate/locatedcrate = locate(/obj/structure/closet/crate) in get_turf(mover)
if(locatedcrate) //you can walk on it like tables, if you're not in an open crate trying to move to a closed crate
if(opened) //if we're open, allow entering regardless of located crate openness
return 1
if(!locatedcrate.opened) //otherwise, if the located crate is closed, allow entering
return 1
return !density
/obj/structure/closet/crate/update_icon()
icon_state = "[initial(icon_state)][opened ? "open" : ""]"
cut_overlays()
if(manifest)
add_overlay("manifest")
/obj/structure/closet/crate/attack_hand(mob/user)
if(manifest)
tear_manifest(user)
return
..()
/obj/structure/closet/crate/open(mob/living/user)
. = ..()
if(. && manifest)
to_chat(user, "<span class='notice'>The manifest is torn off [src].</span>")
playsound(src, 'sound/items/poster_ripped.ogg', 75, 1)
manifest.forceMove(get_turf(src))
manifest = null
update_icon()
/obj/structure/closet/crate/proc/tear_manifest(mob/user)
to_chat(user, "<span class='notice'>You tear the manifest off of [src].</span>")
playsound(src, 'sound/items/poster_ripped.ogg', 75, 1)
manifest.forceMove(loc)
if(ishuman(user))
user.put_in_hands(manifest)
manifest = null
update_icon()
/obj/structure/closet/crate/internals
desc = "A internals crate."
name = "internals crate"
icon_state = "o2crate"
/obj/structure/closet/crate/trashcart
desc = "A heavy, metal trashcart with wheels."
name = "trash cart"
icon_state = "trashcart"
/obj/structure/closet/crate/medical
desc = "A medical crate."
name = "medical crate"
icon_state = "medicalcrate"
/obj/structure/closet/crate/freezer
desc = "A freezer."
name = "freezer"
icon_state = "freezer"
/obj/structure/closet/crate/freezer/blood
name = "blood freezer"
desc = "A freezer containing packs of blood."
/obj/structure/closet/crate/freezer/blood/PopulateContents()
. = ..()
new /obj/item/weapon/reagent_containers/blood/empty(src)
new /obj/item/weapon/reagent_containers/blood/empty(src)
new /obj/item/weapon/reagent_containers/blood/AMinus(src)
new /obj/item/weapon/reagent_containers/blood/BMinus(src)
new /obj/item/weapon/reagent_containers/blood/BPlus(src)
new /obj/item/weapon/reagent_containers/blood/OMinus(src)
new /obj/item/weapon/reagent_containers/blood/OPlus(src)
new /obj/item/weapon/reagent_containers/blood/lizard(src)
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/blood/random(src)
/obj/structure/closet/crate/freezer/surplus_limbs
name = "surplus prosthetic limbs"
desc = "A crate containing an assortment of cheap prosthetic limbs."
/obj/structure/closet/crate/freezer/surplus_limbs/PopulateContents()
. = ..()
new /obj/item/bodypart/l_arm/robot/surplus(src)
new /obj/item/bodypart/l_arm/robot/surplus(src)
new /obj/item/bodypart/r_arm/robot/surplus(src)
new /obj/item/bodypart/r_arm/robot/surplus(src)
new /obj/item/bodypart/l_leg/robot/surplus(src)
new /obj/item/bodypart/l_leg/robot/surplus(src)
new /obj/item/bodypart/r_leg/robot/surplus(src)
new /obj/item/bodypart/r_leg/robot/surplus(src)
/obj/structure/closet/crate/radiation
desc = "A crate with a radiation sign on it."
name = "radiation crate"
icon_state = "radiation"
/obj/structure/closet/crate/hydroponics
name = "hydroponics crate"
desc = "All you need to destroy those pesky weeds and pests."
icon_state = "hydrocrate"
/obj/structure/closet/crate/engineering
name = "engineering crate"
icon_state = "engi_crate"
/obj/structure/closet/crate/engineering/electrical
icon_state = "engi_e_crate"
/obj/structure/closet/crate/rcd
desc = "A crate for the storage of an RCD."
name = "\improper RCD crate"
icon_state = "engi_crate"
/obj/structure/closet/crate/rcd/PopulateContents()
..()
for(var/i in 1 to 4)
new /obj/item/weapon/rcd_ammo(src)
new /obj/item/weapon/construction/rcd(src)
/obj/structure/closet/crate/science
name = "science crate"
desc = "A science crate."
icon_state = "scicrate"