Merge pull request #694 from bitburner-official/moreResetInfo

NETSCRIPT: Add owned aug and SF info to getResetInfo
This commit is contained in:
hydroflame 2023-08-01 09:45:50 -04:00 committed by GitHub
commit 2c0f7f1eda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 0 deletions

@ -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. |

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ResetInfo](./bitburner.resetinfo.md) &gt; [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<string, number>;
```

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [ResetInfo](./bitburner.resetinfo.md) &gt; [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<number, number>;
```

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