/obj/structure/filingcabinet name = "filing cabinet" desc = "A large cabinet with drawers." icon = 'icons/obj/bureaucracy.dmi' icon_state = "filingcabinet" density = 1 anchored = 1 /obj/structure/filingcabinet/chestdrawer name = "chest drawer" icon_state = "chestdrawer" /obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in future -Pete icon_state = "tallcabinet" /obj/structure/filingcabinet/initialize() for(var/obj/item/I in loc) if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo)) I.loc = src /obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob) if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo)) user << "You put [P] in [src]." user.drop_item() P.loc = src icon_state = "[initial(icon_state)]-open" sleep(5) icon_state = initial(icon_state) updateUsrDialog() else if(istype(P, /obj/item/weapon/wrench)) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) anchored = !anchored user << "You [anchored ? "wrench" : "unwrench"] \the [src]." else user << "You can't put [P] in [src]!" /obj/structure/filingcabinet/attack_hand(mob/user as mob) if(contents.len <= 0) user << "\The [src] is empty." return user.machine = src var/dat = "
| [P.name] |