diff --git a/tgui/packages/tgui/interfaces/AbductorConsole.js b/tgui/packages/tgui/interfaces/AbductorConsole.js new file mode 100644 index 0000000000..de750bc9ca --- /dev/null +++ b/tgui/packages/tgui/interfaces/AbductorConsole.js @@ -0,0 +1,157 @@ +import { GenericUplink } from './Uplink'; +import { useBackend, useSharedState } from '../backend'; +import { Button, LabeledList, NoticeBox, Section, Tabs } from '../components'; +import { Fragment } from 'inferno'; +import { Window } from '../layouts'; + +export const AbductorConsole = (props, context) => { + const [tab, setTab] = useSharedState(context, 'tab', 1); + return ( + + + + setTab(1)}> + Abductsoft 3000 + + setTab(2)}> + Mission Settings + + + {tab === 1 && ( + + )} + {tab === 2 && ( + + + + + )} + + + ); +}; + +const Abductsoft = (props, context) => { + const { act, data } = useBackend(context); + const { + experiment, + points, + credits, + } = data; + + if (!experiment) { + return ( + + No Experiment Machine Detected + + ); + } + + return ( + +
+ + + {points} + + +
+ +
+ ); +}; + +const EmergencyTeleporter = (props, context) => { + const { act, data } = useBackend(context); + const { + pad, + gizmo, + } = data; + + if (!pad) { + return ( + + No Telepad Detected + + ); + } + + return ( +
act('teleporter_send')} /> + )}> + + +
+ ); +}; + +const VestSettings = (props, context) => { + const { act, data } = useBackend(context); + const { + vest, + vest_mode, + vest_lock, + } = data; + + if (!vest) { + return ( + + No Agent Vest Detected + + ); + } + + return ( +
act('toggle_vest')} /> + )}> + + +
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/ApcControl.js b/tgui/packages/tgui/interfaces/ApcControl.js new file mode 100644 index 0000000000..449101d529 --- /dev/null +++ b/tgui/packages/tgui/interfaces/ApcControl.js @@ -0,0 +1,306 @@ +import { map, sortBy } from 'common/collections'; +import { flow } from 'common/fp'; +import { pureComponentHooks } from 'common/react'; +import { useBackend, useLocalState } from '../backend'; +import { Box, Button, Dimmer, Flex, Icon, Table, Tabs } from '../components'; +import { Fragment, Window } from '../layouts'; +import { AreaCharge, powerRank } from './PowerMonitor'; + +export const ApcControl = (props, context) => { + const { data } = useBackend(context); + return ( + + {data.authenticated === 1 && ( + + )} + {data.authenticated === 0 && ( + + )} + + ); +}; + +const ApcLoggedOut = (props, context) => { + const { act, data } = useBackend(context); + const { emagged } = data; + const text = emagged === 1 ? 'Open' : 'Log In'; + return ( + +