Show correct hash capacity gain on cache level upgrade tooltip

This commit is contained in:
Woody Lam 2022-01-05 01:57:39 +00:00
parent f9fd7a48f8
commit 9a0062b376

@ -188,12 +188,13 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
multiplier = Math.min(levelsToMax, purchaseMult as number); multiplier = Math.min(levelsToMax, purchaseMult as number);
} }
const increase = 32 * Math.pow(2, node.cache + multiplier) - node.hashCapacity;
const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier); const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);
upgradeCacheButton = ( upgradeCacheButton = (
<Tooltip <Tooltip
title={ title={
<Typography> <Typography>
+<Hashes hashes={32 * Math.pow(2, node.cache)} /> hashes +<Hashes hashes={increase} /> hashes
</Typography> </Typography>
} }
> >