NETSCRIPT: Add ns.pid variable for accessing the current script's PID (#255)

This commit is contained in:
T.J. Eckman 2022-12-13 09:07:15 -05:00 committed by GitHub
parent f943e5d603
commit 52034ccedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

@ -119,7 +119,7 @@ Resolving deltas: 100% (43708/43708), done.
Updating files: 100% (2561/2561), done. Updating files: 100% (2561/2561), done.
# Change to the directory that contains your local copy. # 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 # 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. # upstream is also the place where proposed changes are merged into the game.

4
package-lock.json generated

@ -1,12 +1,12 @@
{ {
"name": "bitburner", "name": "bitburner",
"version": "2.1.0", "version": "2.2.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "bitburner", "name": "bitburner",
"version": "2.1.0", "version": "2.2.0",
"hasInstallScript": true, "hasInstallScript": true,
"license": "SEE LICENSE IN license.txt", "license": "SEE LICENSE IN license.txt",
"dependencies": { "dependencies": {

@ -1931,6 +1931,7 @@ export function NetscriptFunctions(ws: WorkerScript): ExternalAPI<NSFull> {
obj[key] = new StampedLayer(ws, obj[key]); obj[key] = new StampedLayer(ws, obj[key]);
} }
instance.args = ws.args.slice(); instance.args = ws.args.slice();
instance.pid = ws.pid;
return instance; return instance;
} }