Makes pulsing the AI wire of a borg offer the user the option to change it and properly notifies the AI when it is cut.
This commit is contained in:
@@ -26,12 +26,17 @@
|
||||
status += "The reset module hardware light is [R.has_module() ? "on" : "off"]."
|
||||
return status
|
||||
|
||||
/datum/wires/robot/on_pulse(wire)
|
||||
/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 = select_active_ai(R)
|
||||
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)
|
||||
@@ -59,8 +64,10 @@
|
||||
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
|
||||
R.undeploy() //Forced disconnect of an AI should this body be a shell.
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user