mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
spawn defaults to 1 thread
This commit is contained in:
parent
ca7cb0bead
commit
762b5b44aa
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -889,7 +889,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
|||||||
const server = safeGetServer(hostname, "exec");
|
const server = safeGetServer(hostname, "exec");
|
||||||
return runScriptFromScript("exec", server, scriptname, args, workerScript, threads);
|
return runScriptFromScript("exec", server, scriptname, args, workerScript, threads);
|
||||||
},
|
},
|
||||||
spawn: function (scriptname: any, threads: any, ...args: any[]): any {
|
spawn: function (scriptname: any, threads: any = 1, ...args: any[]): any {
|
||||||
updateDynamicRam("spawn", getRamCost("spawn"));
|
updateDynamicRam("spawn", getRamCost("spawn"));
|
||||||
if (!scriptname || !threads) {
|
if (!scriptname || !threads) {
|
||||||
throw makeRuntimeErrorMsg("spawn", "Usage: spawn(scriptname, threads)");
|
throw makeRuntimeErrorMsg("spawn", "Usage: spawn(scriptname, threads)");
|
||||||
|
Loading…
Reference in New Issue
Block a user