forked from Aurorastation/Aurora.3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuit_storage_unit.dm
50 lines (45 loc) · 1.15 KB
/
suit_storage_unit.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/datum/wires/suit_storage_unit
proper_name = "Suit Storage Unit"
holder_type = /obj/machinery/suit_cycler
/datum/wires/suit_storage_unit/New()
wires = list(
WIRE_SAFETY,
WIRE_SHOCK,
WIRE_LOCKDOWN
)
add_duds(1)
..()
/datum/wires/suit_storage_unit/interactable(mob/user)
if(!..())
return FALSE
var/obj/machinery/suit_cycler/S = holder
if(S.panel_open)
return TRUE
return FALSE
/datum/wires/suit_storage_unit/get_status()
var/obj/machinery/suit_cycler/S = holder
. += ..()
. += "The orange light is [S.electrified ? "off" : "on"]."
. += "The red light is [S.safeties ? "off" : "blinking"]."
. += "The yellow light is [S.locked ? "on" : "off"]."
/datum/wires/suit_storage_unit/on_pulse(wire)
var/obj/machinery/suit_cycler/S = holder
switch(wire)
if(WIRE_SAFETY)
S.safeties = !S.safeties
if(WIRE_SHOCK)
S.electrified = 30
if(WIRE_LOCKDOWN)
S.locked = !S.locked
/datum/wires/suit_storage_unit/on_cut(wire, mend, source)
var/obj/machinery/suit_cycler/S = holder
switch(wire)
if(WIRE_SAFETY)
S.safeties = mend
if(WIRE_SHOCK)
S.locked = mend
if(WIRE_LOCKDOWN)
if(mend)
S.electrified = 0
else
S.electrified = -1