mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 13:18:09 +01:00
99 lines
2.4 KiB
Plaintext
99 lines
2.4 KiB
Plaintext
/obj/item/card/id/keycard
|
|
name = "keycard"
|
|
desc = "Allows access to certain doors."
|
|
icon_state = "keycard-red"
|
|
initial_sprite_stack = list()
|
|
light_color = "#0099ff"
|
|
access = list(801)
|
|
special_handling = TRUE
|
|
|
|
/obj/item/card/id/keycard/update_icon()
|
|
return
|
|
|
|
/obj/item/card/id/keycard/read()
|
|
to_chat(usr, span_notice("It is a red keycard, it must unlock something."))
|
|
|
|
/obj/item/card/id/keycard/blue
|
|
icon_state = "keycard-blue"
|
|
access = list(802)
|
|
|
|
/obj/item/card/id/keycard/green
|
|
icon_state = "keycard-green"
|
|
access = list(803)
|
|
|
|
/obj/item/glamourcrystal
|
|
name = "white crytal"
|
|
desc = "A large white, highly reflective crystal with a slight glow to it."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "glamourcrystal"
|
|
|
|
/obj/structure/crystalholder
|
|
name = "material cart"
|
|
desc = "A cart designed to fit and carry one large carefully cut crystal."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "crystalholder"
|
|
var/crystal = 0
|
|
density = 1
|
|
anchored = 0
|
|
|
|
/obj/structure/crystalholder/attackby(obj/item/W, mob/living/user)
|
|
if(istype(W,/obj/item/glamourcrystal) && !crystal)
|
|
icon_state = "crystalholder_full"
|
|
update_icon()
|
|
crystal = 1
|
|
user.drop_item()
|
|
qdel(W)
|
|
to_chat(user, span_notice("You insert the crystal into the receptacle."))
|
|
else
|
|
to_chat(user, span_notice("There isn't a slot for that."))
|
|
|
|
/obj/machinery/crystalexperimenter
|
|
name = "crystal experimenter"
|
|
desc = "A cart designed to fit and carry one large carefully cut crystal."
|
|
icon = 'icons/obj/32x64.dmi'
|
|
icon_state = "crystalexperimenter"
|
|
var/used_up = 0
|
|
density = 0
|
|
anchored = 1
|
|
layer = 5
|
|
var/id = "glamour"
|
|
|
|
/obj/machinery/crystalexperimenter/proc/experiment()
|
|
if(used_up)
|
|
return
|
|
var/crystal_found = 0
|
|
for(var/obj/structure/crystalholder/C in get_turf(src))
|
|
if(C.crystal)
|
|
used_up = 1
|
|
crystal_found = 1
|
|
continue
|
|
|
|
if(!crystal_found)
|
|
return
|
|
|
|
for(var/obj/machinery/light/L in GLOB.machines)
|
|
if(L.z != src.z || get_dist(src,L) > 10)
|
|
continue
|
|
else
|
|
L.flicker(10)
|
|
|
|
for(var/obj/machinery/door/blast/M in GLOB.machines)
|
|
if(M.id == id)
|
|
if(M.density)
|
|
spawn(0)
|
|
M.open()
|
|
return
|
|
else
|
|
spawn(0)
|
|
M.close()
|
|
return
|
|
|
|
|
|
/obj/machinery/button/remote/experimenter
|
|
name = "experimentation switch"
|
|
desc = "A switch tied to nearby machinery."
|
|
|
|
/obj/machinery/button/remote/experimenter/trigger()
|
|
for(var/obj/machinery/crystalexperimenter/E in GLOB.machines)
|
|
E.experiment()
|