mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 10:02:28 +00:00
/obj/effects is now /obj/effect. /obj/station_objects is now /obj/structure. Did a bit of minor blob work. The Bay 12 body bags were replaced with closets because having two sets of code that do almost the same thing is silly. Changed back a few of the last jobproc edits as the remove from list before assign was a check to see if the mob was fucked up and if it was remove it so we did not check it again as it would still be fucked up. The medbay/tox monkeys names are random once more. More random name monkeys will help with changeling and clean up the observe/mob menus. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2324 316c924e-a436-60f5-8080-3fe189b3f50e
77 lines
2.3 KiB
Plaintext
77 lines
2.3 KiB
Plaintext
/obj/item/weapon/storage/lockbox
|
|
name = "Lockbox"
|
|
desc = "A locked box."
|
|
icon_state = "lockbox+l"
|
|
item_state = "syringe_kit"
|
|
w_class = 4
|
|
max_w_class = 3
|
|
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
|
|
storage_slots = 4
|
|
req_access = list(access_armory)
|
|
var
|
|
locked = 1
|
|
broken = 0
|
|
icon_locked = "lockbox+l"
|
|
icon_closed = "lockbox"
|
|
icon_broken = "lockbox+b"
|
|
|
|
|
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if (istype(W, /obj/item/weapon/card/id))
|
|
if(src.broken)
|
|
user << "\red It appears to be broken."
|
|
return
|
|
if(src.allowed(user))
|
|
src.locked = !( src.locked )
|
|
if(src.locked)
|
|
src.icon_state = src.icon_locked
|
|
user << "\red You lock the [src.name]!"
|
|
return
|
|
else
|
|
src.icon_state = src.icon_closed
|
|
user << "\red You unlock the [src.name]!"
|
|
return
|
|
else
|
|
user << "\red Access Denied"
|
|
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
|
|
broken = 1
|
|
locked = 0
|
|
desc = "It appears to be broken."
|
|
icon_state = src.icon_broken
|
|
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
|
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
|
|
spark_system.set_up(5, 0, src.loc)
|
|
spark_system.start()
|
|
playsound(src.loc, 'blade1.ogg', 50, 1)
|
|
playsound(src.loc, "sparks", 50, 1)
|
|
for(var/mob/O in viewers(user, 3))
|
|
O.show_message(text("\blue The locker has been sliced open by [] with an energy blade!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
|
|
else
|
|
for(var/mob/O in viewers(user, 3))
|
|
O.show_message(text("\blue The locker has been broken by [] with an electromagnetic card!", user), 1, text("You hear a faint electrical spark."), 2)
|
|
|
|
if(!locked)
|
|
..()
|
|
else
|
|
user << "\red Its locked!"
|
|
return
|
|
|
|
|
|
show_to(mob/user as mob)
|
|
if(locked)
|
|
user << "\red Its locked!"
|
|
else
|
|
..()
|
|
return
|
|
|
|
|
|
/obj/item/weapon/storage/lockbox/loyalty
|
|
name = "Lockbox (Loyalty Implants)"
|
|
req_access = list(access_security)
|
|
|
|
New()
|
|
..()
|
|
new /obj/item/weapon/implantcase/loyalty(src)
|
|
new /obj/item/weapon/implantcase/loyalty(src)
|
|
new /obj/item/weapon/implantcase/loyalty(src)
|
|
new /obj/item/weapon/implanter/loyalty(src) |