This commit is contained in:
Olivier Gagnon
2022-01-08 13:25:06 -05:00
parent fb90e21a31
commit f4ac7344c4
126 changed files with 1919 additions and 612 deletions

View File

@@ -21,13 +21,25 @@ Array containing current stamina and max stamina.
RAM cost: 4 GB Returns an array with two elements: \* \[Current stamina, Max stamina\]
## Example
## Example 1
```ts
// NS1:
function getStaminaPercentage() {
let res = bladeburner.getStamina();
var res = bladeburner.getStamina();
return res[0] / res[1];
}
```
## Example 2
```ts
// NS2:
function getStaminaPercentage() {
const [current, max] = ns.bladeburner.getStamina();
return current / max;
}
```