import { sortBy } from 'common/collections'; import { useBackend } from '../backend'; import { AnimatedNumber, Box, Button, LabeledList, NoticeBox, NumberInput, Section } from '../components'; import { Window } from '../layouts'; export const TelesciConsole = (props, context) => { const { act, data } = useBackend(context); const { noTelepad } = data; return ( {(noTelepad && ) || } ); }; const TelesciNoTelepadError = (props, context) => { return (
No telepad located.
Please add telepad data.
); }; export const TelesciConsoleContent = (props, context) => { const { act, data } = useBackend(context); const { insertedGps, rotation, currentZ, cooldown, crystalCount, maxCrystals, maxPossibleDistance, maxAllowedDistance, distance, tempMsg, sectorOptions, lastTeleData, } = data; return (
act('ejectGPS')} content="Eject GPS" />}> {(cooldown && ( Telepad is recharging. Please wait seconds. )) || {tempMsg}} v + '°'} step={1} minValue={-900} maxValue={900} onDrag={(e, val) => act('setrotation', { val: val })} /> v + '/' + maxAllowedDistance + ' m'} minValue={0} maxValue={maxAllowedDistance} step={1} stepPixelSize={4} onDrag={(e, val) => act('setdistance', { val: val })} /> {sortBy((v) => Number(v))(sectorOptions).map((z) => (
); };