mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 22:18:27 +01:00
Add an Access Denied message when RIG is locked (#17611)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useBackend, useSharedState } from 'tgui/backend';
|
||||
import { Window } from 'tgui/layouts';
|
||||
import { Box } from 'tgui-core/components';
|
||||
import { Box, Stack } from 'tgui-core/components';
|
||||
import { UI_INTERACTIVE } from 'tgui-core/constants';
|
||||
|
||||
import { RIGSuitHardware } from './RIGSuitHardware';
|
||||
import { RIGSuitLoader } from './RIGSuitLoader';
|
||||
@@ -9,10 +10,24 @@ import { RIGSuitStatus } from './RIGSuitStatus';
|
||||
import type { Data } from './types';
|
||||
|
||||
export const RIGSuit = (props) => {
|
||||
const { data } = useBackend<Data>();
|
||||
const { config, data } = useBackend<Data>();
|
||||
|
||||
const { interfacelock, malf, aicontrol, ai } = data;
|
||||
|
||||
if (config.status < UI_INTERACTIVE) {
|
||||
return (
|
||||
<Window width={300} height={300}>
|
||||
<Window.Content backgroundColor="black">
|
||||
<Stack align="center" justify="center" fill>
|
||||
<Stack.Item fontSize={2} color="bad">
|
||||
--RIG Access Denied--
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Window.Content>
|
||||
</Window>
|
||||
);
|
||||
}
|
||||
|
||||
const [showLoading, setShowLoading] = useSharedState('rigsuit-loading', true);
|
||||
|
||||
if (showLoading) {
|
||||
|
||||
Reference in New Issue
Block a user