mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
FEATURE: Add "Recent Errors" tab and improved error modal (#2169)
This commit is contained in:
committed by
GitHub
parent
cf72937faf
commit
18f84396e2
@@ -6,7 +6,7 @@ import { ScriptDeath } from "./ScriptDeath";
|
||||
import { WorkerScript } from "./WorkerScript";
|
||||
import { workerScripts } from "./WorkerScripts";
|
||||
|
||||
import { GetServer } from "../Server/AllServers";
|
||||
import { GetAllServers, GetServer } from "../Server/AllServers";
|
||||
import { AddRecentScript } from "./RecentScripts";
|
||||
import { ITutorial } from "../InteractiveTutorial";
|
||||
import { AlertEvents } from "../ui/React/AlertManager";
|
||||
@@ -34,6 +34,16 @@ export function killWorkerScriptByPid(pid: number, killer?: WorkerScript): boole
|
||||
return false;
|
||||
}
|
||||
|
||||
export const killAllScripts = () => {
|
||||
for (const server of GetAllServers()) {
|
||||
for (const byPid of server.runningScriptMap.values()) {
|
||||
for (const pid of byPid.keys()) {
|
||||
killWorkerScriptByPid(pid);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function stopAndCleanUpWorkerScript(ws: WorkerScript): void {
|
||||
// Only clean up once.
|
||||
// Important: Only this function can set stopFlag!
|
||||
|
||||
Reference in New Issue
Block a user