diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 9e6a1df3be..23c72fc036 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -803,6 +803,8 @@ /obj/item/rig/dropped(mob/user) . = ..(user) + // So the next user will see the boot animation + tgui_shared_states.Cut() for(var/piece in list("helmet","gauntlets","chest","boots")) toggle_piece(piece, user, ONLY_RETRACT) if(wearer && wearer.wearing_rig == src) diff --git a/code/modules/clothing/spacesuits/rig/rig_tgui.dm b/code/modules/clothing/spacesuits/rig/rig_tgui.dm index 2aa11cd859..8f93cb11ce 100644 --- a/code/modules/clothing/spacesuits/rig/rig_tgui.dm +++ b/code/modules/clothing/spacesuits/rig/rig_tgui.dm @@ -1,3 +1,6 @@ +// Just used to force the icon into the rsc, Byond.iconRefMap does the rest +GLOBAL_DATUM_INIT(rigsuit_ui_icon, /icon, 'icons/hud/rig_ui_slots.dmi') + /* * This defines the global UI for RIGSuits. * It has all of the relevant TGUI procs, but it's entry point is in rig_verbs.dm diff --git a/icons/hud/rig_ui_slots.dmi b/icons/hud/rig_ui_slots.dmi new file mode 100644 index 0000000000..a0909b688a Binary files /dev/null and b/icons/hud/rig_ui_slots.dmi differ diff --git a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitHardware.tsx b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitHardware.tsx index 28e03e73e2..ec5b196005 100644 --- a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitHardware.tsx +++ b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitHardware.tsx @@ -1,5 +1,13 @@ import { useBackend } from 'tgui/backend'; -import { Button, LabeledList, Section } from 'tgui-core/components'; +import { + Box, + DmIcon, + Icon, + Section, + Stack, + Tooltip, +} from 'tgui-core/components'; +import { type BooleanLike } from 'tgui-core/react'; import { capitalize } from 'tgui-core/string'; import type { Data } from './types'; @@ -8,6 +16,9 @@ export const RIGSuitHardware = (props) => { const { act, data } = useBackend(); const { + sealed, + aioverride, + cooling, // Disables buttons while the suit is busy sealing, // Each piece @@ -23,68 +34,212 @@ export const RIGSuitHardware = (props) => { return (
- - act('toggle_piece', { piece: 'helmet' })} - > - {helmetDeployed ? 'Deployed' : 'Deploy'} - - } + + + + + + act('toggle_piece', { piece: 'helmet' })} + /> + act('toggle_piece', { piece: 'chest' })} + /> + act('toggle_piece', { piece: 'gauntlets' })} + /> + act('toggle_piece', { piece: 'boots' })} + /> + + + + + - {helmet ? capitalize(helmet) : 'ERROR'} - - act('toggle_piece', { piece: 'gauntlets' })} - > - {gauntletsDeployed ? 'Deployed' : 'Deploy'} - - } - > - {gauntlets ? capitalize(gauntlets) : 'ERROR'} - - act('toggle_piece', { piece: 'boots' })} - > - {bootsDeployed ? 'Deployed' : 'Deploy'} - - } - > - {boots ? capitalize(boots) : 'ERROR'} - - act('toggle_piece', { piece: 'chest' })} - > - {chestDeployed ? 'Deployed' : 'Deploy'} - - } - > - {chest ? capitalize(chest) : 'ERROR'} - - +   + + + + + + + act('toggle_seals')} + > + + + + + + + + + act('toggle_ai_control')} + > + + + + + + + + + act('toggle_cooling')} + > + + + + + + + + + act('tank_settings')} + > + + + + + + + + + + +
); }; + +const HardwarePiece = (props: { + name: string; + icon: string; + selected: BooleanLike; + disabled: BooleanLike; + onClick: () => void; +}) => { + let filter; + if (props.disabled) { + filter = 'grayscale(100%) brightness(0.5)'; + } else if (props.selected) { + filter = undefined; + } else { + filter = 'grayscale(80%)'; + } + + return ( + + + + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitLoader.tsx b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitLoader.tsx new file mode 100644 index 0000000000..c917217106 --- /dev/null +++ b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitLoader.tsx @@ -0,0 +1,118 @@ +import { useEffect, useState } from 'react'; +import { Window } from 'tgui/layouts'; +import { Box, Stack } from 'tgui-core/components'; + +// This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. +// http://creativecommons.org/licenses/by-sa/4.0/ +const NTLogoReact = (props) => { + return ( + + + + + + ); +}; + +const LoadingText = (props: { onFinish?: () => void }) => { + const onFinish = props.onFinish ? props.onFinish : () => {}; + useEffect(() => { + const timer = setTimeout(() => { + onFinish(); + }, 5000); + + return () => { + clearTimeout(timer); + }; + }, []); + + return ( + + RigOS Loading... + + Starting Power-On Self Test... + + + POST:{' '} + + GOOD. + + + + Loading UI... + + + All Systems Ready! + + + ); +}; + +export const LoaderNT = (props: { onFinish?: () => void }) => { + const [showLogo, setShowLogo] = useState(true); + + useEffect(() => { + setTimeout(() => { + setShowLogo(false); + }, 3500); + }, []); + + if (showLogo) { + return ( + + + + + + ); + } + + return ; +}; + +export const RIGSuitLoader = (props: { onFinish?: () => void }) => { + // You can skip to the end by clicking + const onFinish = props.onFinish ? props.onFinish : () => {}; + + return ( + + onFinish()} + style={{ cursor: 'pointer' }} + > + + + + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitStatus.tsx b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitStatus.tsx index e9b463054d..a2b6ad9b2d 100644 --- a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitStatus.tsx +++ b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitStatus.tsx @@ -5,7 +5,6 @@ import { LabeledList, ProgressBar, Section, - Stack, } from 'tgui-core/components'; import type { Data } from './types'; @@ -31,57 +30,7 @@ export const RIGSuitStatus = (props) => { } = data; return ( -
- - - - -