mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
* buncha things from upstream * datums globals, onclick * datums * game folder, holy shit mirror bot why * modules * icons * dme * compiles cleanly * tools purge * updates maps * double check just because. and wew lad * incidentally, this needs more work first * some things * weh * sound cleanup and icons * reeeee * compile issues * oh look, fresh code sync * cleans up some unused icons * dirty vars * reeeeeeeeeeeeeeee * wew lad. fuck off with this already
40 lines
861 B
Plaintext
40 lines
861 B
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 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
|
|
/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
|