Files
Bubberstation/code/datums/wires/suit_storage_unit.dm
MrMelbert 4fe16acd0b Minor shock() refactor (#95204)
## About The Pull Request

`shock` was copy pasted across a bunch of base types
I needed the behavior unified and it was fairly trivial to do 
So now we have `/obj/proc/shock` which all the old implementations call 

## Changelog

🆑 Melbert
refactor: Made some minor changes to how things like airlocks, vendors,
and autolathes shock you. Report any wierdness with that
/🆑
2026-02-24 21:12:59 -05:00

46 lines
1.1 KiB
Plaintext

/datum/wires/suit_storage_unit
holder_type = /obj/machinery/suit_storage_unit
proper_name = "Suit Storage Unit"
/datum/wires/suit_storage_unit/New(atom/holder)
wires = list(
WIRE_HACK, WIRE_SAFETY,
WIRE_ZAP
)
add_duds(2)
..()
/datum/wires/suit_storage_unit/interactable(mob/user)
if(!..())
return FALSE
var/obj/machinery/suit_storage_unit/SSU = holder
if(SSU.panel_open)
return TRUE
/datum/wires/suit_storage_unit/get_status()
var/obj/machinery/suit_storage_unit/SSU = holder
var/list/status = list()
status += "The UV bulb is [SSU.uv_super ? "glowing" : "dim"]."
status += "The service light is [SSU.safeties ? "off" : "on"]."
return status
/datum/wires/suit_storage_unit/on_pulse(wire)
var/obj/machinery/suit_storage_unit/SSU = holder
switch(wire)
if(WIRE_HACK)
SSU.uv_super = !SSU.uv_super
if(WIRE_SAFETY)
SSU.safeties = !SSU.safeties
if(WIRE_ZAP)
SSU.shock(usr, 100)
/datum/wires/suit_storage_unit/on_cut(wire, mend, source)
var/obj/machinery/suit_storage_unit/SSU = holder
switch(wire)
if(WIRE_HACK)
SSU.uv_super = !mend
if(WIRE_SAFETY)
SSU.safeties = mend
if(WIRE_ZAP)
SSU.shock(usr, 100)