Merge pull request #3793 from Nezrahm/dev

HACKNET: Make hashnet perfectly convert overflow
This commit is contained in:
hydroflame 2022-07-06 14:38:13 -04:00 committed by GitHub
commit e5ecf1b502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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");
}