Make hashnet perfectly convert overflow

This commit is contained in:
Nezrahm 2022-05-29 20:10:25 +02:00
parent 6f017bf4f6
commit 178015a140

@ -426,7 +426,7 @@ function processAllHacknetServerEarnings(player: IPlayer, numCycles: number): nu
if (upgrade === null) throw new Error("Could not get the hash upgrade");
if (!upgrade.cost) throw new Error("Upgrade is not properly configured");
const multiplier = Math.floor(wastedHashes / upgrade.cost);
const multiplier = wastedHashes / upgrade.cost;
if (multiplier > 0) {
player.gainMoney(upgrade.value * multiplier, "hacknet");
}