mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-19 15:54:09 +02:00
API: make ns.atExit add the callback to an array instead of setting it (#1059)
This commit is contained in:
@@ -78,8 +78,8 @@ export class WorkerScript {
|
||||
/** hostname on which this script is running */
|
||||
hostname: string;
|
||||
|
||||
/** Function called when the script ends. */
|
||||
atExit: (() => void) | undefined = undefined;
|
||||
/**Map of functions called when the script ends. */
|
||||
atExit: Map<string, () => void> = new Map();
|
||||
|
||||
constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => NSFull) {
|
||||
this.name = runningScriptObj.filename;
|
||||
|
||||
Reference in New Issue
Block a user