mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +01:00
Merge pull request #694 from bitburner-official/moreResetInfo
NETSCRIPT: Add owned aug and SF info to getResetInfo
This commit is contained in:
commit
2c0f7f1eda
@ -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. |
|
||||
|
||||
|
13
markdown/bitburner.resetinfo.ownedaugs.md
Normal file
13
markdown/bitburner.resetinfo.ownedaugs.md
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[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<string, number>;
|
||||
```
|
13
markdown/bitburner.resetinfo.ownedsf.md
Normal file
13
markdown/bitburner.resetinfo.ownedsf.md
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[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<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);
|
||||
|
4
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
4
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user