Add owned aug and SF info to getResetInfo

This commit is contained in:
omuretsu 2023-08-01 01:40:30 -04:00
parent 83b7c380ff
commit 75579a2ff1
2 changed files with 6 additions and 0 deletions

@ -1762,6 +1762,8 @@ export const ns: InternalAPI<NSFull> = {
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);

@ -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<string, number>;
/** A map of owned SF to their levels. Keyed by the SF number. Map values are the SF level. */
ownedSF: Map<number, number>;
}
/** @public */