import { Fragment } from 'inferno'; import { useBackend } from '../backend'; import { Box, Button, Flex, LabeledList, Section, AnimatedNumber, Collapsible } from '../components'; import { Window } from '../layouts'; export const OvermapEngines = (props, context) => { return ( ); }; export const OvermapEnginesContent = (props, context) => { const { act, data } = useBackend(context); const { global_state, // This indicates all engines being powered up or not global_limit, // Global Thrust limit engines_info, // Array of engines total_thrust, // Total thrust of all engines together } = data; return (
{engines_info.map((engine, i) => ( Engine #{i + 1} | Thrust: | Limit:{' '} val + '%'} /> // "Engine " + (i + 1) // + " | Thrust: " + engine.eng_thrust // + " | Limit: " + engine.eng_thrust_limiter + "%" }>
{engine.eng_type} {engine.eng_on ? (engine.eng_on === 1 ? 'Online' : 'Booting') : 'Offline'} {engine.eng_status.map((status) => { if (Array.isArray(status)) { return {status[0]}; } else { return {status}; } })} {engine.eng_thrust}
))}
); };