mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 14:13:48 +01:00
Minor refactor
This commit is contained in:
parent
d52e1f44b4
commit
b3aa0578fb
@ -988,12 +988,9 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
|
||||
LogBoxEvents.emit(runningScriptObj);
|
||||
},
|
||||
closeTail: function (pid?: number): void {
|
||||
closeTail: function (_pid: unknown = workerScript.scriptRef.pid): void {
|
||||
updateDynamicRam("closeTail", getRamCost(Player, "closeTail"));
|
||||
//Get the pid of the calling script if no pid is given
|
||||
if (pid === undefined) {
|
||||
pid = workerScript.scriptRef.pid;
|
||||
}
|
||||
const pid = helper.number("closeTail", "pid", _pid);
|
||||
//Emit an event to tell the game to close the tail window if it exists
|
||||
LogBoxCloserEvents.emit(pid);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user