mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 17:53:00 +02:00
speed up ns1
This commit is contained in:
@@ -266,7 +266,14 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
|
||||
return reject(workerScript);
|
||||
}
|
||||
|
||||
if (interpreter.step()) {
|
||||
let more = true;
|
||||
let i = 0;
|
||||
while (i < 3 && more) {
|
||||
more = more && interpreter.step();
|
||||
i++;
|
||||
}
|
||||
|
||||
if (more) {
|
||||
setTimeout(runInterpreter, Settings.CodeInstructionRunTime);
|
||||
} else {
|
||||
resolve(workerScript);
|
||||
|
||||
Reference in New Issue
Block a user