Fixes drop airlock bolts button state for traitor borgs. (#9333)

Fixes #9325

Traitor borgs could toggle state through the UI, but the greyed out button made it appear they could not.

Button now properly changes to blue/green instead of grey, if your borg character is an antag.
This commit is contained in:
mikomyazaki
2020-07-12 15:59:01 +03:00
committed by GitHub
parent 4949493fd0
commit 63f3c0981d
3 changed files with 10 additions and 1 deletions
+2
View File
@@ -726,6 +726,8 @@ About the new airlock wires panel:
VUEUI_SET_CHECK(data["elea"], electrified_at, ., data)
var/isAI = issilicon(user) && !player_is_antag(user.mind)
VUEUI_SET_CHECK(data["isai"], isAI, ., data)
var/isAdmin = check_rights(R_ADMIN)
VUEUI_SET_CHECK(data["isadmin"], isAdmin, ., data)
VUEUI_SET_CHECK(data["idscan"], !aiDisabledIdScanner, ., data)
VUEUI_SET_CHECK(data["bolts"], !locked, ., data)
+7
View File
@@ -0,0 +1,7 @@
author: mikomyazaki
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
changes:
- bugfix: "A traitor AI/cyborg accessing an airlock UI will see the proper button state for dropping door bolts."
+1 -1
View File
@@ -43,7 +43,7 @@
</vui-group-item>
<vui-group-item v-for="(c, k) in commands" :key="k" :label="c.n + ':'">
<vui-button style="min-width: 6em" :class="{on: s[k]}" :params="{ command: k, activate: c.i ? 1 : 0 }">{{ c.et || 'Enabled' }}</vui-button>
<vui-button :disabled="c.a && s.isai" style="min-width: 6em" :class="{on: !s[k] && !c.d, danger: !s[k] && c.d}" :params="{ command: k, activate: c.i ? 0 : 1 }">{{ c.dt || 'Disabled' }}</vui-button>
<vui-button :disabled="!!((c.a && s.isai) || isAdmin)" style="min-width: 6em" :class="{on: !s[k] && !c.d, danger: !s[k] && c.d}" :params="{ command: k, activate: c.i ? 0 : 1 }">{{ c.dt || 'Disabled' }}</vui-button>
</vui-group-item>
</vui-group>
</div>