fix scp and write in ns1

This commit is contained in:
Olivier Gagnon 2021-11-13 19:33:37 -05:00
parent 3cbf2e8e7d
commit badba2eb1b

@ -167,14 +167,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
const entry = ns[name]; const entry = ns[name];
if (typeof entry === "function") { if (typeof entry === "function") {
//Async functions need to be wrapped. See JS-Interpreter documentation //Async functions need to be wrapped. See JS-Interpreter documentation
if ( if (["hack", "grow", "weaken", "sleep", "prompt", "manualHack", "scp", "write"].includes(name)) {
name === "hack" ||
name === "grow" ||
name === "weaken" ||
name === "sleep" ||
name === "prompt" ||
name === "manualHack"
) {
const tempWrapper = function (...args: any[]): void { const tempWrapper = function (...args: any[]): void {
const fnArgs = []; const fnArgs = [];