Fix extraction amounts to use correct extractors

This commit is contained in:
calli
2025-04-23 11:33:08 +03:00
parent a871bac35f
commit c07dba3afc

View File

@@ -133,9 +133,9 @@ export const ExtractionSimulationTooltip: React.FC<ExtractionSimulationTooltipPr
</Box> </Box>
<Box sx={{ flex: 1, minWidth: 0 }}> <Box sx={{ flex: 1, minWidth: 0 }}>
<Stack spacing={1}> <Stack spacing={1}>
{extractorPrograms.map(({ typeId, cycleTime, cycles, installTime, expiryTime }) => { {extractorPrograms.map(({ typeId, cycleTime, cycles, installTime, expiryTime }, idx) => {
const prediction = getProgramOutputPrediction( const prediction = getProgramOutputPrediction(
extractors.find(e => e.typeId === typeId)?.baseValue || 0, extractors[idx].baseValue,
CYCLE_TIME, CYCLE_TIME,
cycles cycles
); );
@@ -159,6 +159,9 @@ export const ExtractionSimulationTooltip: React.FC<ExtractionSimulationTooltipPr
<Typography variant="body2"> <Typography variant="body2">
Average per Cycle: {(totalOutput / cycles).toFixed(1)} units Average per Cycle: {(totalOutput / cycles).toFixed(1)} units
</Typography> </Typography>
<Typography variant="body2">
Average per hour: {(totalOutput / cycles * 2).toFixed(1)} units
</Typography>
<Typography variant="body2"> <Typography variant="body2">
Expires in: <Countdown overtime={true} date={DateTime.fromISO(expiryTime).toMillis()} /> Expires in: <Countdown overtime={true} date={DateTime.fromISO(expiryTime).toMillis()} />
</Typography> </Typography>