mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
Fixes a bunch of fallout from the tgui PR (#13648)
* screamies fixes a bunch of fallout from the tgui PR.. probably * Empty commit to poke travis
This commit is contained in:
@@ -8,6 +8,7 @@ export const RoboticsControlConsole = (props, context) => {
|
||||
const [tab, setTab] = useSharedState(context, 'tab', 1);
|
||||
const {
|
||||
can_hack,
|
||||
can_convert,
|
||||
cyborgs = [],
|
||||
drones = [],
|
||||
} = data;
|
||||
@@ -34,7 +35,9 @@ export const RoboticsControlConsole = (props, context) => {
|
||||
</Tabs.Tab>
|
||||
</Tabs>
|
||||
{tab === 1 && (
|
||||
<Cyborgs cyborgs={cyborgs} can_hack={can_hack} />
|
||||
<Cyborgs cyborgs={cyborgs}
|
||||
can_hack={can_hack}
|
||||
can_convert={can_convert} />
|
||||
)}
|
||||
{tab === 2 && (
|
||||
<Drones drones={drones} />
|
||||
@@ -45,7 +48,7 @@ export const RoboticsControlConsole = (props, context) => {
|
||||
};
|
||||
|
||||
const Cyborgs = (props, context) => {
|
||||
const { cyborgs, can_hack } = props;
|
||||
const { cyborgs, can_hack, can_convert } = props;
|
||||
const { act, data } = useBackend(context);
|
||||
if (!cyborgs.length) {
|
||||
return (
|
||||
@@ -70,6 +73,15 @@ const Cyborgs = (props, context) => {
|
||||
ref: cyborg.ref,
|
||||
})} />
|
||||
)}
|
||||
{!!can_convert && !cyborg.servant && (
|
||||
<Button
|
||||
icon="terminal"
|
||||
content="Convert"
|
||||
color="bad"
|
||||
onClick={() => act('convert', {
|
||||
ref: cyborg.ref,
|
||||
})} />
|
||||
)}
|
||||
<Button.Confirm
|
||||
icon={cyborg.locked_down ? 'unlock' : 'lock'}
|
||||
color={cyborg.locked_down ? 'good' : 'default'}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user