diff --git a/markdown/bitburner.resetinfo.md b/markdown/bitburner.resetinfo.md index b9388dc41..eddc8e1c5 100644 --- a/markdown/bitburner.resetinfo.md +++ b/markdown/bitburner.resetinfo.md @@ -19,4 +19,6 @@ interface ResetInfo | [currentNode](./bitburner.resetinfo.currentnode.md) | | number | The current bitnode | | [lastAugReset](./bitburner.resetinfo.lastaugreset.md) | | number | Numeric timestamp (from Date.now()) of last augmentation reset | | [lastNodeReset](./bitburner.resetinfo.lastnodereset.md) | | number | Numeric timestamp (from Date.now()) of last bitnode reset | +| [ownedAugs](./bitburner.resetinfo.ownedaugs.md) | | Map<string, number> | A map of owned augmentations to their levels. Keyed by the augmentation name. Map values are the augmentation level (e.g. for NeuroFlux governor). | +| [ownedSF](./bitburner.resetinfo.ownedsf.md) | | Map<number, number> | A map of owned SF to their levels. Keyed by the SF number. Map values are the SF level. | diff --git a/markdown/bitburner.resetinfo.ownedaugs.md b/markdown/bitburner.resetinfo.ownedaugs.md new file mode 100644 index 000000000..5aa13b34f --- /dev/null +++ b/markdown/bitburner.resetinfo.ownedaugs.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [ResetInfo](./bitburner.resetinfo.md) > [ownedAugs](./bitburner.resetinfo.ownedaugs.md) + +## ResetInfo.ownedAugs property + +A map of owned augmentations to their levels. Keyed by the augmentation name. Map values are the augmentation level (e.g. for NeuroFlux governor). + +**Signature:** + +```typescript +ownedAugs: Map; +``` diff --git a/markdown/bitburner.resetinfo.ownedsf.md b/markdown/bitburner.resetinfo.ownedsf.md new file mode 100644 index 000000000..f22e0d8bb --- /dev/null +++ b/markdown/bitburner.resetinfo.ownedsf.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [ResetInfo](./bitburner.resetinfo.md) > [ownedSF](./bitburner.resetinfo.ownedsf.md) + +## ResetInfo.ownedSF property + +A map of owned SF to their levels. Keyed by the SF number. Map values are the SF level. + +**Signature:** + +```typescript +ownedSF: Map; +``` diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 534b36664..28cd1c257 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -1762,6 +1762,8 @@ export const ns: InternalAPI = { lastAugReset: Player.lastAugReset, lastNodeReset: Player.lastNodeReset, currentNode: Player.bitNodeN, + ownedAugs: new Map(Player.augmentations.map((aug) => [aug.name, aug.level])), + ownedSF: new Map(Player.sourceFiles), }), getFunctionRamCost: (ctx) => (_name) => { const name = helpers.string(ctx, "name", _name); diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index b33e7fe65..974b8779f 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -74,6 +74,10 @@ interface ResetInfo { lastNodeReset: number; /** The current bitnode */ currentNode: number; + /** A map of owned augmentations to their levels. Keyed by the augmentation name. Map values are the augmentation level (e.g. for NeuroFlux governor). */ + ownedAugs: Map; + /** A map of owned SF to their levels. Keyed by the SF number. Map values are the SF level. */ + ownedSF: Map; } /** @public */