From 793e5702f1bbaeae9763774ef7552b8f3563752a Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Sun, 5 Dec 2010 07:29:36 +0000 Subject: [PATCH] Added the ability to lock down a borg with the robot terminal I am very much unhappy with the current state of the lockdown, as it leaves the robot unable to speak (and thus unable to explain itself), but I have thus far been unable to find an easy way to leave it unable to act while still able to speak Cyborgs can no longer use the robot terminal against cyborgs that aren't themselves git-svn-id: http://tgstation13.googlecode.com/svn/trunk@538 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/mob/living/silicon/robot.dm | 1 + code/game/machinery/computer/robot.dm | 32 +++++++++++++++++-- code/modules/mob/living/silicon/robot/life.dm | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/code/defines/mob/living/silicon/robot.dm b/code/defines/mob/living/silicon/robot.dm index d3bcfa6d02..9cc8ebbfc7 100644 --- a/code/defines/mob/living/silicon/robot.dm +++ b/code/defines/mob/living/silicon/robot.dm @@ -47,3 +47,4 @@ var/weaponlock_time = 120 var/datum/ai_laws/laws = null //Making it so borgs can have laws when there isn't an AI. var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default + var/lockcharge //Used when locking down a borg to preserve cell charge diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 1b3a5a327c..11fd2a4dc1 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -68,14 +68,18 @@ if(screen == 1) for(var/mob/living/silicon/robot/R in world) if(istype(user, /mob/living/silicon/ai)) - if (R.connected_ai != user) - continue + if (R.connected_ai != user) continue + if(istype(user, /mob/living/silicon/robot)) + if (R != user) continue dat += "[R.name] |" if(R.stat) dat += " Not Responding |" + else if (!R.canmove) + dat += " Locked Down |" else dat += " Operating Normally |" - if(R.cell) + if (!R.canmove) + else if(R.cell) dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |" else dat += " No Cell Installed |" @@ -87,6 +91,7 @@ dat += " Slaved to [R.connected_ai.name] |" else dat += " Independent from AI |" + dat += "([R.canmove ? "Lockdown" : "Release"]) " dat += "(Destroy)" dat += "
" dat += "(Return to Main Menu)
" @@ -179,6 +184,27 @@ else usr << "\red Access Denied." + else if (href_list["stopbot"]) + if(src.allowed(usr)) + var/mob/living/silicon/robot/R = locate(href_list["stopbot"]) + if(R) + var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort") + if(choice == "Confirm") + if(R) +// message_admins("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!") + R.canmove = !R.canmove + if (R.lockcharge) + R.cell.charge = R.lockcharge + R.lockcharge = null + R << "Your lockdown has been removed!" + else + R.lockcharge = R.cell.charge + R.cell.charge = 0 + R << "You have been locked down!" + + else + usr << "\red Access Denied." + src.add_fingerprint(usr) src.updateUsrDialog() return diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index b933bde575..8f31086f92 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -61,7 +61,7 @@ src.stat = 1 update_canmove() - if(paralysis || stunned || weakened || buckled) canmove = 0 + if(paralysis || stunned || weakened || buckled || lockcharge) canmove = 0 else canmove = 1