This commit is contained in:
@@ -99,7 +99,7 @@
|
||||
radio.keyslot = null
|
||||
//END CITADEL EDIT
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots -= src
|
||||
set_connected_ai(null)
|
||||
if(shell)
|
||||
GLOB.available_ai_shells -= src
|
||||
else
|
||||
@@ -560,11 +560,10 @@
|
||||
gib()
|
||||
|
||||
/mob/living/silicon/robot/proc/UnlinkSelf()
|
||||
if(src.connected_ai)
|
||||
connected_ai.connected_robots -= src
|
||||
src.connected_ai = null
|
||||
lawupdate = 0
|
||||
scrambledcodes = 1
|
||||
set_connected_ai(null)
|
||||
lawupdate = FALSE
|
||||
locked_down = FALSE
|
||||
scrambledcodes = TRUE
|
||||
//Disconnect it's camera so it's not so easily tracked.
|
||||
if(!QDELETED(builtInCamera))
|
||||
QDEL_NULL(builtInCamera)
|
||||
@@ -586,10 +585,10 @@
|
||||
W.attack_self(src)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/SetLockdown(state = 1)
|
||||
/mob/living/silicon/robot/proc/SetLockdown(state = TRUE)
|
||||
// They stay locked down if their wire is cut.
|
||||
if(wires.is_cut(WIRE_LOCKDOWN))
|
||||
state = 1
|
||||
state = TRUE
|
||||
if(state)
|
||||
throw_alert("locked", /obj/screen/alert/locked)
|
||||
else
|
||||
@@ -991,7 +990,7 @@
|
||||
builtInCamera.c_tag = real_name //update the camera name too
|
||||
mainframe = AI
|
||||
deployed = TRUE
|
||||
connected_ai = mainframe
|
||||
set_connected_ai(mainframe)
|
||||
mainframe.connected_robots |= src
|
||||
lawupdate = TRUE
|
||||
lawsync()
|
||||
@@ -1090,9 +1089,8 @@
|
||||
. = ..(user)
|
||||
|
||||
/mob/living/silicon/robot/proc/TryConnectToAI()
|
||||
connected_ai = select_active_ai_with_fewest_borgs()
|
||||
set_connected_ai(select_active_ai_with_fewest_borgs(z))
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots += src
|
||||
lawsync()
|
||||
lawupdate = 1
|
||||
return TRUE
|
||||
@@ -1134,7 +1132,7 @@
|
||||
|
||||
/mob/living/silicon/robot/adjustStaminaLossBuffered(amount, updating_health = 1)
|
||||
if(istype(cell))
|
||||
cell.charge -= amount*5
|
||||
cell.charge -= amount * 5
|
||||
|
||||
/mob/living/silicon/robot/verb/viewmanifest()
|
||||
set category = "Robot Commands"
|
||||
@@ -1143,3 +1141,14 @@
|
||||
if(usr.stat == DEAD)
|
||||
return //won't work if dead
|
||||
ai_roster()
|
||||
|
||||
/mob/living/silicon/robot/proc/set_connected_ai(new_ai)
|
||||
if(connected_ai == new_ai)
|
||||
return
|
||||
. = connected_ai
|
||||
connected_ai = new_ai
|
||||
if(.)
|
||||
var/mob/living/silicon/ai/old_ai = .
|
||||
old_ai.connected_robots -= src
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots |= src
|
||||
|
||||
@@ -138,8 +138,8 @@
|
||||
/mob/living/silicon/robot/proc/beep_boop_rogue_bot(mob/user)
|
||||
SetEmagged(1)
|
||||
SetStun(60) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown
|
||||
lawupdate = 0
|
||||
connected_ai = null
|
||||
lawupdate = FALSE
|
||||
set_connected_ai(null)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] emagged cyborg [ADMIN_LOOKUPFLW(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
|
||||
Reference in New Issue
Block a user