Files
GS13NG/code/datums/wires/r_n_d.dm
T
CitadelStationBot cc0b768c72 [MIRROR] [READY] RND TECHWEBS + DEPARTMENTAL LATHES (#4014)
* [READY] RND TECHWEBS + DEPARTMENTAL LATHES

* resetting all the maps because we can worry about them later.

* Regexing

* I'm fucked

* Fixes

* .

* maps

* bleh

* ree

* fixes
2017-12-11 16:36:38 -08:00

49 lines
1.0 KiB
Plaintext

/datum/wires/rnd
holder_type = /obj/machinery/rnd
randomize = TRUE
/datum/wires/rnd/New(atom/holder)
wires = list(
WIRE_HACK, WIRE_DISABLE,
WIRE_SHOCK
)
add_duds(5)
..()
/datum/wires/rnd/interactable(mob/user)
var/obj/machinery/rnd/R = holder
if(R.panel_open)
return TRUE
/datum/wires/rnd/get_status()
var/obj/machinery/rnd/R = holder
var/list/status = list()
status += "The red light is [R.disabled ? "off" : "on"]."
status += "The green light is [R.shocked ? "off" : "on"]."
status += "The blue light is [R.hacked ? "off" : "on"]."
return status
/datum/wires/rnd/on_pulse(wire)
set waitfor = FALSE
var/obj/machinery/rnd/R = holder
switch(wire)
if(WIRE_HACK)
R.hacked = !R.hacked
if(WIRE_DISABLE)
R.disabled = !R.disabled
if(WIRE_SHOCK)
R.shocked = TRUE
sleep(100)
if(R)
R.shocked = FALSE
/datum/wires/rnd/on_cut(wire, mend)
var/obj/machinery/rnd/R = holder
switch(wire)
if(WIRE_HACK)
R.hacked = !mend
if(WIRE_DISABLE)
R.disabled = !mend
if(WIRE_SHOCK)
R.shocked = !mend