feat: split volume

This commit is contained in:
TrèsAbhi committed 2024-04-05 09:06:44 -05:00
1 parent 7fff1c9737
commit 3eee946978
2 files changed
+28 -6

No files matched your search

+20 -4
View File
@@ -423,13 +423,29 @@ export default function Page() {
} }
/> />
<Row <Row
name="Size" name="Width"
value={(stats) => stats.tankSize[1]}
deltaType="lowerIsBetter"
display={(stats) => stats.tankSize[1].toFixed(1)}
/>
<Row
name="Height"
value={(stats) => stats.tankSize[0]}
deltaType="lowerIsBetter"
display={(stats) => stats.tankSize[0].toFixed(1)}
/>
<Row
name="Length"
value={(stats) => stats.tankSize[2]}
deltaType="lowerIsBetter"
display={(stats) => stats.tankSize[2].toFixed(1)}
/>
<Row
name="Volume"
value={(stats) => stats.tankSize.reduce((a, b) => a * b, 1)} value={(stats) => stats.tankSize.reduce((a, b) => a * b, 1)}
deltaType="lowerIsBetter" deltaType="lowerIsBetter"
display={(stats) => display={(stats) =>
stats.tankSize stats.tankSize.reduce((a, b) => a * b, 1).toFixed(1)
.map((tankSize) => tankSize.toFixed(1))
.join(' x ')
} }
/> />
</Table.Body> </Table.Body>
@@ -476,8 +476,14 @@ export function Characteristics() {
<InfoWithDelta indent name="Caught on fire" decimals={0}> <InfoWithDelta indent name="Caught on fire" decimals={0}>
{stats.camouflageCaughtOnFire * 100} {stats.camouflageCaughtOnFire * 100}
</InfoWithDelta> </InfoWithDelta>
<Info name="Size" unit="m"> <Info name="Width" unit="m" decimals={0}>
{stats.tankSize.map((component) => component.toFixed(1)).join(' x ')} {stats.tankSize[1]}
</Info>
<Info name="Height" unit="m" decimals={0}>
{stats.tankSize[0]}
</Info>
<Info name="Length" unit="m" decimals={0}>
{stats.tankSize[2]}
</Info> </Info>
</Flex> </Flex>