mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
NETSCRIPT: add ns.getResetInfo(#490)
* Move lastAugReset and lastNodeReset back to main API under getResetInfo, also included currentNode. * The associated properties are deprecated on getPlayer()
This commit is contained in:
31
markdown/bitburner.ns.getresetinfo.md
Normal file
31
markdown/bitburner.ns.getresetinfo.md
Normal file
@@ -0,0 +1,31 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [getResetInfo](./bitburner.ns.getresetinfo.md)
|
||||
|
||||
## NS.getResetInfo() method
|
||||
|
||||
Get information about resets.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getResetInfo(): ResetInfo;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
[ResetInfo](./bitburner.resetinfo.md)
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 1 GB
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
```js
|
||||
const resetInfo = ns.getResetInfo();
|
||||
const lastAugReset = resetInfo.lastAugReset;
|
||||
ns.tprint(`The last augmentation reset was: ${new Date(lastAugReset)}`);
|
||||
ns.tprint(`It has been ${Date.now() - lastAugReset}ms since the last augmentation reset.`);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user