Update src/NetscriptFunctions.ts

Co-authored-by: Nikolai Korolev <CrafterKolyan@mail.ru>
This commit is contained in:
Chris380 2022-04-13 15:47:31 +02:00 committed by GitHub
parent 44c71347d7
commit e0f4ec6594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -765,8 +765,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
return 0;
}
const growthFactor = server.moneyMax / server.moneyAvailable;
const maxThreadsNeeded = Math.ceil(numCycleForGrowth(server, growthFactor, Player, cores));
const maxThreadsNeeded = Math.ceil(numCycleForGrowthCorrected(server, server.moneyMax, server.moneyAvailable, Player, cores));
threads = Math.min(threads, maxThreadsNeeded);
}