Files
Bubberstation/code/datums/wires/mod.dm
SkyratBot 58f82b5161 [MIRROR] [Ready] MODsuits [MDB IGNORE] (#10244)
* [Ready] MODsuits

* we dont need to add these people as codeowners, goodness gracious

* have to remove this because upstream

* part 1 of these fixes

* EEEE

* Update peacekeeper_clothing.dm

* E

* E

* Auto stash before merge of "upstream-merge-59109" and "origin/upstream-merge-59109"

* E

* Update expeditionary_trooper.dm

* more removal

* nice

* modsuti modstui modusuti

* fixes

* E

* ITS MODsuit not HARDSUIT

* more hardsuit references

* MODSUIT NOT HARSUITEDSA

* Maps

* More ,map

* oop

* e

* oo aa

* 0

* ting tang

* Update modsuit_tailsprites.dm

* hi fikou

* bs tech update

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2021-12-25 13:32:49 +00:00

58 lines
1.6 KiB
Plaintext

/datum/wires/mod
holder_type = /obj/item/mod/control
proper_name = "MOD control unit"
/datum/wires/mod/New(atom/holder)
wires = list(WIRE_HACK, WIRE_DISABLE, WIRE_SHOCK, WIRE_INTERFACE)
add_duds(2)
..()
/datum/wires/mod/interactable(mob/user)
if(!..())
return FALSE
var/obj/item/mod/control/mod = holder
return mod.open
/datum/wires/mod/get_status()
var/obj/item/mod/control/mod = holder
var/list/status = list()
status += "The orange light is [mod.seconds_electrified ? "on" : "off"]."
status += "The red light is [mod.malfunctioning ? "off" : "blinking"]."
status += "The green light is [mod.locked ? "on" : "off"]."
status += "The yellow light is [mod.interface_break ? "off" : "on"]."
return status
/datum/wires/mod/on_pulse(wire)
var/obj/item/mod/control/mod = holder
switch(wire)
if(WIRE_HACK)
mod.locked = !mod.locked
if(WIRE_DISABLE)
mod.malfunctioning = TRUE
if(WIRE_SHOCK)
mod.seconds_electrified = MACHINE_DEFAULT_ELECTRIFY_TIME
if(WIRE_INTERFACE)
mod.interface_break = !mod.interface_break
/datum/wires/mod/on_cut(wire, mend)
var/obj/item/mod/control/mod = holder
switch(wire)
if(WIRE_HACK)
if(!mend)
mod.req_access = list()
if(WIRE_DISABLE)
mod.malfunctioning = !mend
if(WIRE_SHOCK)
if(mend)
mod.seconds_electrified = MACHINE_NOT_ELECTRIFIED
else
mod.seconds_electrified = MACHINE_ELECTRIFIED_PERMANENT
if(WIRE_INTERFACE)
mod.interface_break = !mend
/datum/wires/mod/ui_act(action, params)
var/obj/item/mod/control/mod = holder
if(!issilicon(usr) && mod.seconds_electrified && mod.shock(usr))
return FALSE
return ..()