import { Fragment } from 'inferno'; import { useBackend } from '../backend'; import { Box, Button, LabeledList, ProgressBar, Section } from '../components'; import { Window } from '../layouts'; export const DiseaseSplicer = (props, context) => { const { act, data } = useBackend(context); const { busy } = data; return ( {busy ? (
{busy}
) : ( )}
); }; const DiseaseSplicerVirusDish = (props, context) => { const { act, data } = useBackend(context); const { dish_inserted, effects, info, growth, affected_species } = data; return (
act('eject')} />}> {info ? (
{info}
) : (
{(effects && effects.map((effect) => ( ({effect.stage}) {effect.name} {effect.badness > 1 ? 'Dangerous!' : null} ))) || No virus sample loaded.}
{!affected_species || !affected_species.length ? 'None' : null} {affected_species.sort().join(', ')}
CAUTION: Reverse engineering will destroy the viral sample. {effects.map((e) => (
)}
); }; const DiseaseSplicerStorage = (props, context) => { const { act, data } = useBackend(context); const { dish_inserted, buffer, species_buffer, effects, info, growth, affected_species, busy } = data; return (
{buffer ? ( {buffer.name} ({buffer.stage}) ) : species_buffer ? ( {species_buffer} ) : ( 'Empty' )}
); };