From 022aa8f422fb5c89429f390ab2d3959dfd5b802c Mon Sep 17 00:00:00 2001 From: ShadowLarkens Date: Sun, 27 Apr 2025 06:23:37 -0700 Subject: [PATCH] Add an Access Denied message when RIG is locked (#17611) --- .../tgui/interfaces/RIGSuit/index.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tgui/packages/tgui/interfaces/RIGSuit/index.tsx b/tgui/packages/tgui/interfaces/RIGSuit/index.tsx index 9a6da962445..2f469ae91b9 100644 --- a/tgui/packages/tgui/interfaces/RIGSuit/index.tsx +++ b/tgui/packages/tgui/interfaces/RIGSuit/index.tsx @@ -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(); + const { config, data } = useBackend(); const { interfacelock, malf, aicontrol, ai } = data; + if (config.status < UI_INTERACTIVE) { + return ( + + + + + --RIG Access Denied-- + + + + + ); + } + const [showLoading, setShowLoading] = useSharedState('rigsuit-loading', true); if (showLoading) {