mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 05:05:47 +01:00
Merge pull request #3793 from Nezrahm/dev
HACKNET: Make hashnet perfectly convert overflow
This commit is contained in:
commit
e5ecf1b502
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user