mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 05:33:54 +01:00
fix undying script bug
This commit is contained in:
parent
4d80813707
commit
5b38ee3cfb
BIN
dist/ext/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf
vendored
Normal file
BIN
dist/ext/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -941,6 +941,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
return runScriptFromScript("run", scriptServer, scriptname, args, workerScript, threads);
|
||||
},
|
||||
exec: function (scriptname: any, hostname: any, threads: any = 1, ...args: any[]): any {
|
||||
console.log(`${scriptname} ${hostname} ${threads} ${JSON.stringify(args)}`);
|
||||
updateDynamicRam("exec", getRamCost("exec"));
|
||||
if (scriptname === undefined || hostname === undefined) {
|
||||
throw makeRuntimeErrorMsg("exec", "Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");
|
||||
@ -1061,11 +1062,13 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
throw makeRuntimeErrorMsg("scp", "No scripts to copy");
|
||||
}
|
||||
let res = true;
|
||||
await Promise.all(scripts.map(async function(script) {
|
||||
if (!await NetscriptFunctions(workerScript).scp(script, hostname1, hostname2)) {
|
||||
res = false;
|
||||
}
|
||||
}));
|
||||
await Promise.all(
|
||||
scripts.map(async function (script) {
|
||||
if (!(await NetscriptFunctions(workerScript).scp(script, hostname1, hostname2))) {
|
||||
res = false;
|
||||
}
|
||||
}),
|
||||
);
|
||||
return Promise.resolve(res);
|
||||
}
|
||||
|
||||
|
@ -709,6 +709,7 @@ export function runScriptFromScript(
|
||||
);
|
||||
const runningScriptObj = new RunningScript(script, args);
|
||||
runningScriptObj.threads = threads;
|
||||
runningScriptObj.server = server.hostname;
|
||||
|
||||
return startWorkerScript(runningScriptObj, server, workerScript);
|
||||
}
|
||||
|
@ -443,8 +443,11 @@ export function InteractiveTutorialRoot(): React.ReactElement {
|
||||
<Typography color={"primary"}>Tutorial</Typography>
|
||||
</ListItem>
|
||||
<Typography>
|
||||
in the main navigation menu to look at the documentation. If you are an experienced JavaScript developer, I
|
||||
would highly suggest you check out the section on NetscriptJS/Netscript 2.0, it's faster and more powerful.
|
||||
in the main navigation menu to look at the documentation.
|
||||
<br />
|
||||
<br />
|
||||
If you know even a little bit of programming it is highly recommended you use NS2 instead. You will enjoy
|
||||
the game much more.
|
||||
<br />
|
||||
<br />
|
||||
For now, let's move on to something else!
|
||||
|
Loading…
Reference in New Issue
Block a user