mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
added atExit
This commit is contained in:
@@ -3277,6 +3277,13 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
corporation: corporation,
|
||||
|
||||
formulas: formulas,
|
||||
|
||||
atExit: function (f: any): void {
|
||||
if (typeof f !== "function") {
|
||||
throw makeRuntimeErrorMsg("atExit", "argument should be function");
|
||||
}
|
||||
workerScript.atExit = f;
|
||||
},
|
||||
flags: function (data: any): any {
|
||||
data = toNative(data);
|
||||
// We always want the help flag.
|
||||
|
||||
Reference in New Issue
Block a user