Files
Bubberstation/code/datums/wires/robot.dm
coiax 1a4a4b0eb2 The cyborg reset module wire is always marked with a star (#41877)
🆑 coiax
add: The cyborg reset module wire has a star symbol marking, allowing
a trained Roboticist to easily provide resets without altering
any other cyborg settings.
/🆑

When I removed cyborg module reset modules, it was pulse-to-reset, which
when applied to all the wires on a cyborg, had no real side effects
if there was only one AI.

Now that it's a cut-to-reset wire, cutting all the wires will invariably
desync the cyborg from its parent AI, given that all cyborg wires are
randomised.

My intention was never for the reset wire to be "found" just like door
wires, just to make it cheaper and possible to reset a borg module
"in the field".

Someone who hasn't read the wiki or knows what a "star symbol" means,
will have to be told what to look for, so I chose this method of signaling
rather than just "the module reset wire is X".

Also, it's a Keep Talking And No One Explodes reference.
2018-12-19 17:21:18 -08:00

87 lines
3.0 KiB
Plaintext

/datum/wires/robot
holder_type = /mob/living/silicon/robot
randomize = TRUE
/datum/wires/robot/New(atom/holder)
wires = list(
WIRE_AI, WIRE_CAMERA,
WIRE_LAWSYNC, WIRE_LOCKDOWN,
WIRE_RESET_MODULE
)
add_duds(2)
..()
/datum/wires/robot/interactable(mob/user)
var/mob/living/silicon/robot/R = holder
if(R.wiresexposed)
return TRUE
/datum/wires/robot/get_status()
var/mob/living/silicon/robot/R = holder
var/list/status = list()
status += "The law sync module is [R.lawupdate ? "on" : "off"]."
status += "The intelligence link display shows [R.connected_ai ? R.connected_ai.name : "NULL"]."
status += "The camera light is [!isnull(R.builtInCamera) && R.builtInCamera.status ? "on" : "off"]."
status += "The lockdown indicator is [R.lockcharge ? "on" : "off"]."
status += "There is a star symbol above the [get_color_of_wire(WIRE_RESET_MODULE)] wire."
return status
/datum/wires/robot/on_pulse(wire, user)
var/mob/living/silicon/robot/R = holder
switch(wire)
if(WIRE_AI) // Pulse to pick a new AI.
if(!R.emagged)
var/new_ai
if(user)
new_ai = select_active_ai(user)
else
new_ai = select_active_ai(R)
R.notify_ai(DISCONNECT)
if(new_ai && (new_ai != R.connected_ai))
R.connected_ai = new_ai
if(R.shell)
R.undeploy() //If this borg is an AI shell, disconnect the controlling AI and assign ti to a new AI
R.notify_ai(AI_SHELL)
else
R.notify_ai(TRUE)
if(WIRE_CAMERA) // Pulse to disable the camera.
if(!QDELETED(R.builtInCamera) && !R.scrambledcodes)
R.builtInCamera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lens focuses loudly.", "Your camera lens focuses loudly.")
if(WIRE_LAWSYNC) // Forces a law update if possible.
if(R.lawupdate)
R.visible_message("[R] gently chimes.", "LawSync protocol engaged.")
R.lawsync()
R.show_laws()
if(WIRE_LOCKDOWN)
R.SetLockdown(!R.lockcharge) // Toggle
if(WIRE_RESET_MODULE)
if(R.has_module())
R.visible_message("[R]'s module servos twitch.", "Your module display flickers.")
/datum/wires/robot/on_cut(wire, mend)
var/mob/living/silicon/robot/R = holder
switch(wire)
if(WIRE_AI) // Cut the AI wire to reset AI control.
if(!mend)
R.notify_ai(DISCONNECT)
if(R.shell)
R.undeploy()
R.connected_ai = null
if(WIRE_LAWSYNC) // Cut the law wire, and the borg will no longer receive law updates from its AI. Repair and it will re-sync.
if(mend)
if(!R.emagged)
R.lawupdate = TRUE
else if(!R.deployed) //AI shells must always have the same laws as the AI
R.lawupdate = FALSE
if (WIRE_CAMERA) // Disable the camera.
if(!QDELETED(R.builtInCamera) && !R.scrambledcodes)
R.builtInCamera.status = mend
R.builtInCamera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lens focuses loudly.", "Your camera lens focuses loudly.")
if(WIRE_LOCKDOWN) // Simple lockdown.
R.SetLockdown(!mend)
if(WIRE_RESET_MODULE)
if(R.has_module() && !mend)
R.ResetModule()