mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Robot Control Console v2
- Bugfix - Cyborgs can no longer lock/unlock other cyborgs or themselves. They can still self destruct themselves via the console. - Bugfix - Antag AI hacking now properly shows apropriate button - Modified UI a little.
This commit is contained in:
@@ -45,6 +45,10 @@
|
||||
if(istype(user, /mob/living/silicon/ai) && (target.connected_ai != user))
|
||||
user << "Access Denied. This robot is not linked to you."
|
||||
return
|
||||
// Cyborgs may blow up themselves via the console
|
||||
if(istype(user, /mob/living/silicon/robot) && user != target)
|
||||
user << "Access Denied."
|
||||
return
|
||||
var/choice = input("Really detonate [target.name]?") in list ("Yes", "No")
|
||||
if(choice != "Yes")
|
||||
return
|
||||
@@ -74,6 +78,10 @@
|
||||
user << "Access Denied. This robot is not linked to you."
|
||||
return
|
||||
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
user << "Access Denied."
|
||||
return
|
||||
|
||||
var/choice = input("Really [target.lockcharge ? "unlock" : "lockdown"] [target.name] ?") in list ("Yes", "No")
|
||||
if(choice != "Yes")
|
||||
return
|
||||
@@ -98,7 +106,7 @@
|
||||
return
|
||||
|
||||
// Antag AI checks
|
||||
if(!istype(user, /mob/living/silicon/ai) || !user.mind.special_role || (user.mind.original != user) || (target.connected_ai != user))
|
||||
if(!istype(user, /mob/living/silicon/ai) || !(user.mind.special_role && user.mind.original == user))
|
||||
user << "Access Denied"
|
||||
return
|
||||
|
||||
@@ -185,7 +193,7 @@
|
||||
robot["master_ai"] = R.connected_ai ? R.connected_ai.name : "None"
|
||||
robot["hackable"] = 0
|
||||
// Antag AIs know whether linked cyborgs are hacked or not.
|
||||
if(operator && istype(operator, /mob/living/silicon/ai) && (R.connected_ai == operator) && operator.mind.special_role && (operator.mind.original != operator))
|
||||
if(operator && istype(operator, /mob/living/silicon/ai) && (R.connected_ai == operator) && (operator.mind.special_role && operator.mind.original == operator))
|
||||
robot["hacked"] = R.emagged ? 1 : 0
|
||||
robot["hackable"] = R.emagged? 0 : 1
|
||||
robots.Add(list(robot))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{{:helper.link('DETONATE', 'radiation', {'nuke' : 1}, 'disabled')}}
|
||||
{{else}}
|
||||
{{:helper.link('DISARM', 'locked', {'arm' : 1})}}
|
||||
{{:helper.link('DETONATE', 'radiation', {'nuke' : 1})}}
|
||||
{{:helper.link('DETONATE', 'radiation', {'nuke' : 1}, null, 'redButton')}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
@@ -20,23 +20,54 @@
|
||||
<div class='item'>
|
||||
<h2>{{:value.name}}</h2>
|
||||
<h3>Information</h3>
|
||||
<b>Status: {{:value.status}}</b><br>
|
||||
<b>Master AI: {{:value.master_ai}}</b><br>
|
||||
<b>Module: {{:value.module}}</b>
|
||||
<span class="itemLabel">
|
||||
Status:
|
||||
</span>
|
||||
<span class="itemContent">
|
||||
{{:value.status}}
|
||||
</span>
|
||||
<span class="itemLabel">
|
||||
Master AI:
|
||||
</span>
|
||||
<span class="itemContent">
|
||||
{{:value.master_ai}}
|
||||
</span>
|
||||
<span class="itemLabel">
|
||||
Module:
|
||||
</span>
|
||||
<span class="itemContent">
|
||||
{{:value.module}}
|
||||
</span>
|
||||
|
||||
{{if value.hackable}}
|
||||
<br><b><i>Safeties: ENABLED</i></b>
|
||||
<span class="itemLabel">
|
||||
Safeties:
|
||||
</span>
|
||||
<span class="itemContent">
|
||||
ENABLED
|
||||
</span>
|
||||
{{else value.hacked}}
|
||||
<br><b><i>Safeties: DISABLED</i></b>
|
||||
<span class="itemLabel">
|
||||
Safeties:
|
||||
</span>
|
||||
<span class="itemContent">
|
||||
DISABLED
|
||||
</span>
|
||||
{{/if}}
|
||||
<h3>Power Cell</h3>
|
||||
{{if value.cell}}
|
||||
<b>Rating: {{:value.cell_capacity}}</b>
|
||||
{{:helper.displayBar(value.cell_percentage, 0, 100, (value.cell_percentage >= 50) ? 'good' : (value.cell_percentage >= 25) ? 'average' : 'bad')}}<br>
|
||||
<b>{{:value.cell_percentage}} %</b>
|
||||
<span class="itemLabel">
|
||||
Rating :
|
||||
</span>
|
||||
<span class="itemContent">
|
||||
{{:value.cell_capacity}}
|
||||
</span>
|
||||
{{:helper.displayBar(value.cell_percentage, 0, 100, (value.cell_percentage >= 50) ? 'good' : (value.cell_percentage >= 25) ? 'average' : 'bad')}}
|
||||
<b> {{:value.cell_percentage}} %</b>
|
||||
{{else}}
|
||||
<b><i>Not Installed</i></b>
|
||||
{{:helper.displayBar(100, 0, 100, 'bad')}}<br>
|
||||
<b>N/A</b>
|
||||
{{:helper.displayBar(100, 0, 100, 'bad')}}
|
||||
<b> N/A %</b>
|
||||
{{/if}}
|
||||
<h3>Actions</h3>
|
||||
{{if value.status == "Operational"}}
|
||||
@@ -44,9 +75,9 @@
|
||||
{{else}}
|
||||
{{:helper.link('Unlock', 'unlocked', {'lockdown' : value.name})}}
|
||||
{{/if}}
|
||||
{{:helper.link('Self-Destruct', 'radiation', {'detonate' : value.name})}}
|
||||
{{:helper.link('Self-Destruct', 'radiation', {'detonate' : value.name}, null, 'redButton')}}
|
||||
{{if value.hackable}}
|
||||
{{:helper.link('Hack', 'calculator', {'hack' : value.name})}}
|
||||
{{:helper.link('Hack', 'calculator', {'hack' : value.name}, null, 'redButton')}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/for}}
|
||||
Reference in New Issue
Block a user