mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 14:13:48 +01:00
Make hashnet perfectly convert overflow
This commit is contained in:
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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user