From 52034ccedc9dab380979b79eaf098b6d8e1f8e09 Mon Sep 17 00:00:00 2001 From: "T.J. Eckman" Date: Tue, 13 Dec 2022 09:07:15 -0500 Subject: [PATCH] NETSCRIPT: Add ns.pid variable for accessing the current script's PID (#255) --- doc/CONTRIBUTING.md | 2 +- package-lock.json | 4 ++-- src/NetscriptFunctions.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index ec0406812..1457dd391 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -119,7 +119,7 @@ Resolving deltas: 100% (43708/43708), done. Updating files: 100% (2561/2561), done. # Change to the directory that contains your local copy. -$ cd bitburner +$ cd bitburner-src # The upstream is the repository that contains the game's source code. The # upstream is also the place where proposed changes are merged into the game. diff --git a/package-lock.json b/package-lock.json index 259251ff7..dc9196b5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bitburner", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bitburner", - "version": "2.1.0", + "version": "2.2.0", "hasInstallScript": true, "license": "SEE LICENSE IN license.txt", "dependencies": { diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index d537ac18f..81e551cd4 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -1931,6 +1931,7 @@ export function NetscriptFunctions(ws: WorkerScript): ExternalAPI { obj[key] = new StampedLayer(ws, obj[key]); } instance.args = ws.args.slice(); + instance.pid = ws.pid; return instance; }