mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
use minimum of given and maximum threads
This commit is contained in:
@@ -633,7 +633,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
|
||||
if (percentHacked > 0) {
|
||||
// thread count is limited to the maximum number of threads needed
|
||||
threads = Math.ceil(1 / percentHacked);
|
||||
threads = Math.min(threads, Math.ceil(1 / percentHacked));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user