mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-01 20:13:51 +01:00
Merge pull request #1743 from danielyxie/dev
spawn defaults to 1 thread
This commit is contained in:
commit
73bbf4d454
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