Files
Paradise/code/game/objects/structures/crates_lockers/walllocker.dm
Tigercat2000 71e5344a98 Mass replace
2016-07-07 19:34:02 -07:00

57 lines
1.8 KiB
Plaintext

//added by cael from old bs12
//not sure if there's an immediate place for secure wall lockers, but i'm sure the players will think of something
/obj/structure/closet/walllocker
desc = "A wall mounted storage locker."
name = "wall locker"
icon = 'icons/obj/walllocker.dmi'
icon_state = "wall-locker"
density = 0
anchored = 1
icon_closed = "wall-locker"
icon_opened = "wall-lockeropen"
/obj/structure/closet/walllocker/close()
..()
density = 0 //It's a locker in a wall, you aren't going to be walking into it.
//spawns endless (3 sets) amounts of breathmask, emergency oxy tank and crowbar
/obj/structure/closet/walllocker/emerglocker
name = "emergency locker"
desc = "A wall mounted locker with emergency supplies"
var/list/spawnitems = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/crowbar)
var/amount = 3 // spawns each items X times.
icon_state = "emerg"
icon_closed = "emerg"
icon_opened = "emergopen"
/obj/structure/closet/walllocker/emerglocker/attack_hand(mob/user as mob)
if(istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to
return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc)
if(!amount)
to_chat(usr, "<spawn class='notice'>It's empty.")
return
if(amount)
to_chat(usr, "<spawn class='notice'>You take out some items from \the [src].")
for(var/path in spawnitems)
new path(src.loc)
amount--
return
/obj/structure/closet/walllocker/emerglocker/north
pixel_y = 32
dir = SOUTH
/obj/structure/closet/walllocker/emerglocker/south
pixel_y = -32
dir = NORTH
/obj/structure/closet/walllocker/emerglocker/west
pixel_x = -32
dir = WEST
/obj/structure/closet/walllocker/emerglocker/east
pixel_x = 32
dir = EAST