import { Fragment } from 'inferno'; import { useBackend } from '../backend'; import { Box, Button, Icon, LabeledList, Knob, NoticeBox, Section, Flex } from '../components'; import { Window } from '../layouts'; export const SuitStorageUnit = (props, context) => { const { act, data } = useBackend(context); const { panelopen, uv_active, broken } = data; let subTemplate = ; if (panelopen) { subTemplate = ; } else if (uv_active) { subTemplate = ; } else if (broken) { subTemplate = ; } return ( {subTemplate} ); }; const SuitStorageUnitContent = (props, context) => { const { act, data } = useBackend(context); const { locked, open, safeties, occupied, suit, helmet, mask } = data; return (
{!open && (
); }; const SuitStorageUnitPanel = (props, context) => { const { act, data } = useBackend(context); const { safeties, uv_super } = data; return (
The panel is ridden with controls, button and meters, labeled in strange signs and symbols that you cannot understand. Probably the manufactoring world's language. Among other things, a few controls catch your eye.
A small dial with a biohazard symbol next to it. It's pointing towards a gauge that reads {uv_super ? '15nm' : '185nm'}. (val ? '15nm' : '185nm')} onChange={(e, val) => act('toggleUV')} />
A thick old-style button, with 2 grimy LED lights next to it. The{' '} {safeties ? ( GREEN ) : ( RED )}{' '} LED is on.
); }; const SuitStorageUnitUV = (props, context) => { return ( Contents are currently being decontaminated. Please wait. ); }; const SuitStorageUnitBroken = (props, context) => { return ( Unit chamber is too contaminated to continue usage. Please call for a qualified individual to perform maintenance. ); };