Files
bitburner-src/src/Terminal/commands/killall.ts
David Walker aa7facd4ba NETSCRIPT: Greatly speed up script launching, and remove the limitation unique args per script (#440)
* Remove the limitation unique args per script
* Internal changes to how runningScripts are stored on the server, to make common usage faster.
2023-04-27 18:21:06 -04:00

13 lines
479 B
TypeScript

import { Terminal } from "../../Terminal";
import { BaseServer } from "../../Server/BaseServer";
import { killWorkerScriptByPid } from "../../Netscript/killWorkerScript";
export function killall(_args: (string | number | boolean)[], server: BaseServer): void {
Terminal.print("Killing all running scripts");
for (const byPid of server.runningScriptMap.values()) {
for (const runningScript of byPid.values()) {
killWorkerScriptByPid(runningScript.pid);
}
}
}