mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-20 03:19:58 +01:00
* autolathe 1 * FUCK MY LIFE * more fixes * autolathe queueing * cl * garbage collection * wire fixes * some final tweaks * on second thought this might be annoying * fix that * whoopsies * that didn't work for shit --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
76 lines
1.7 KiB
Plaintext
76 lines
1.7 KiB
Plaintext
/datum/wires/smartfridge
|
|
proper_name = "SmartFridge"
|
|
holder_type = /obj/machinery/smartfridge
|
|
|
|
/datum/wires/smartfridge/New()
|
|
wires = list(
|
|
WIRE_THROW,
|
|
WIRE_SHOCK,
|
|
WIRE_IDSCAN,
|
|
WIRE_COOLING,
|
|
WIRE_HEATING
|
|
)
|
|
add_duds(1)
|
|
..()
|
|
|
|
/datum/wires/smartfridge/secure
|
|
random = 1
|
|
|
|
/datum/wires/smartfridge/interactable(mob/user)
|
|
if(!..())
|
|
return FALSE
|
|
var/obj/machinery/smartfridge/S = holder
|
|
if(!istype(user, /mob/living/silicon))
|
|
if(S.seconds_electrified)
|
|
if(S.shock(user, 100))
|
|
return FALSE
|
|
if(S.panel_open)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/datum/wires/smartfridge/get_status()
|
|
var/obj/machinery/smartfridge/S = holder
|
|
. += ..()
|
|
. += "The orange light is [S.seconds_electrified ? "off" : "on"]."
|
|
. += "The red light is [S.shoot_inventory ? "off" : "blinking"]."
|
|
. += "A [S.scan_id ? "purple" : "yellow"] light is on."
|
|
. += "The cyan light is [S.cooling ? "on" : "off"]."
|
|
. += "The blue light is [S.heating ? "on" : "off"]."
|
|
|
|
/datum/wires/smartfridge/on_pulse(wire)
|
|
var/obj/machinery/smartfridge/S = holder
|
|
switch(wire)
|
|
if(WIRE_THROW)
|
|
S.shoot_inventory = !S.shoot_inventory
|
|
if(WIRE_SHOCK)
|
|
S.seconds_electrified = 30
|
|
if(WIRE_IDSCAN)
|
|
S.scan_id = !S.scan_id
|
|
if(WIRE_COOLING)
|
|
S.cooling = !S.cooling
|
|
S.heating = FALSE
|
|
if(WIRE_HEATING)
|
|
S.heating = !S.cooling
|
|
S.cooling = FALSE
|
|
|
|
/datum/wires/smartfridge/on_cut(wire, mend, source)
|
|
var/obj/machinery/smartfridge/S = holder
|
|
switch(wire)
|
|
if(WIRE_THROW)
|
|
S.shoot_inventory = !mend
|
|
if(WIRE_SHOCK)
|
|
if(mend)
|
|
S.seconds_electrified = 0
|
|
else
|
|
S.seconds_electrified = -1
|
|
if(WIRE_IDSCAN)
|
|
S.scan_id = 1
|
|
if(WIRE_COOLING)
|
|
S.cooling = mend
|
|
S.heating = FALSE
|
|
if(WIRE_HEATING)
|
|
S.heating = mend
|
|
S.cooling = FALSE
|
|
|
|
|