mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-06 05:17:37 +01:00
15 lines
706 B
TypeScript
15 lines
706 B
TypeScript
|
import { ITerminal } from "../ITerminal";
|
||
|
import { IEngine } from "../../IEngine";
|
||
|
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||
|
import { BaseServer } from "../../Server/BaseServer";
|
||
|
import { killWorkerScript } from "../../Netscript/killWorkerScript";
|
||
|
import { WorkerScriptStartStopEventEmitter } from "../../Netscript/WorkerScriptStartStopEventEmitter";
|
||
|
|
||
|
export function killall(terminal: ITerminal, engine: IEngine, player: IPlayer, server: BaseServer): void {
|
||
|
for (let i = server.runningScripts.length - 1; i >= 0; --i) {
|
||
|
killWorkerScript(server.runningScripts[i], server.ip, false);
|
||
|
}
|
||
|
WorkerScriptStartStopEventEmitter.emitEvent();
|
||
|
terminal.print("Killing all running scripts");
|
||
|
}
|