Files
Yogstation/code/game/objects/structures/crates_lockers/crates/critter.dm
Cruix ac0bad5d61 Added priority overlay system. (#18225)
Added priority overlays to atoms, which will not be removed when overlays are cut and will always remain on top when new overlays are added. This requires everyone to use add_overlay() and cut_overlays() instead of overlays += and overlays.Cut(). These procs are found in __HELPERS/icons.dm, and the priority overlay list is found in game/atoms.dm. Everything else is replacing deprecated overlay manipulation.
2016-06-17 10:11:53 +12:00

38 lines
959 B
Plaintext

/obj/structure/closet/crate/critter
name = "critter crate"
desc = "A crate designed for safe transport of animals. It has an oxygen tank for safe transport in space."
icon_state = "crittercrate"
horizontal = FALSE
allow_objects = FALSE
breakout_time = 1
material_drop = /obj/item/stack/sheet/mineral/wood
var/obj/item/weapon/tank/internals/emergency_oxygen/tank
/obj/structure/closet/crate/critter/New()
..()
tank = new
/obj/structure/closet/crate/critter/Destroy()
var/turf/T = get_turf(src)
tank.loc = T
tank = null
for(var/i in 1 to rand(2, 5))
new material_drop(T)
return ..()
/obj/structure/closet/crate/critter/update_icon()
cut_overlays()
if(opened)
add_overlay("crittercrate_door_open")
else
add_overlay("crittercrate_door")
if(manifest)
add_overlay("manifest")
/obj/structure/closet/crate/critter/return_air()
if(tank)
return tank.air_contents
else
return loc.return_air()