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 */