mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
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
This commit is contained in:
@@ -47,3 +47,4 @@
|
|||||||
var/weaponlock_time = 120
|
var/weaponlock_time = 120
|
||||||
var/datum/ai_laws/laws = null //Making it so borgs can have laws when there isn't an AI.
|
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/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
|
||||||
|
var/lockcharge //Used when locking down a borg to preserve cell charge
|
||||||
|
|||||||
@@ -68,14 +68,18 @@
|
|||||||
if(screen == 1)
|
if(screen == 1)
|
||||||
for(var/mob/living/silicon/robot/R in world)
|
for(var/mob/living/silicon/robot/R in world)
|
||||||
if(istype(user, /mob/living/silicon/ai))
|
if(istype(user, /mob/living/silicon/ai))
|
||||||
if (R.connected_ai != user)
|
if (R.connected_ai != user) continue
|
||||||
continue
|
if(istype(user, /mob/living/silicon/robot))
|
||||||
|
if (R != user) continue
|
||||||
dat += "[R.name] |"
|
dat += "[R.name] |"
|
||||||
if(R.stat)
|
if(R.stat)
|
||||||
dat += " Not Responding |"
|
dat += " Not Responding |"
|
||||||
|
else if (!R.canmove)
|
||||||
|
dat += " Locked Down |"
|
||||||
else
|
else
|
||||||
dat += " Operating Normally |"
|
dat += " Operating Normally |"
|
||||||
if(R.cell)
|
if (!R.canmove)
|
||||||
|
else if(R.cell)
|
||||||
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
|
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
|
||||||
else
|
else
|
||||||
dat += " No Cell Installed |"
|
dat += " No Cell Installed |"
|
||||||
@@ -87,6 +91,7 @@
|
|||||||
dat += " Slaved to [R.connected_ai.name] |"
|
dat += " Slaved to [R.connected_ai.name] |"
|
||||||
else
|
else
|
||||||
dat += " Independent from AI |"
|
dat += " Independent from AI |"
|
||||||
|
dat += "<A href='?src=\ref[src];stopbot=\ref[R]'>(<font color=green><i>[R.canmove ? "Lockdown" : "Release"]</i></font>)</A> "
|
||||||
dat += "<A href='?src=\ref[src];killbot=\ref[R]'>(<font color=red><i>Destroy</i></font>)</A>"
|
dat += "<A href='?src=\ref[src];killbot=\ref[R]'>(<font color=red><i>Destroy</i></font>)</A>"
|
||||||
dat += "<BR>"
|
dat += "<BR>"
|
||||||
dat += "<A href='?src=\ref[src];screen=0'>(Return to Main Menu)</A><BR>"
|
dat += "<A href='?src=\ref[src];screen=0'>(Return to Main Menu)</A><BR>"
|
||||||
@@ -179,6 +184,27 @@
|
|||||||
else
|
else
|
||||||
usr << "\red Access Denied."
|
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.add_fingerprint(usr)
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
src.stat = 1
|
src.stat = 1
|
||||||
|
|
||||||
update_canmove()
|
update_canmove()
|
||||||
if(paralysis || stunned || weakened || buckled) canmove = 0
|
if(paralysis || stunned || weakened || buckled || lockcharge) canmove = 0
|
||||||
else canmove = 1
|
else canmove = 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user