SLEEVES: Add sleeve commands to purchase sleeves and memory via the API (#2443)

This commit is contained in:
TheAimMan
2026-01-20 15:55:51 -05:00
committed by GitHub
parent 19064a1b12
commit 210c338f86
17 changed files with 673 additions and 105 deletions

View File

@@ -0,0 +1,76 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Sleeve](./bitburner.sleeve.md) &gt; [getMemoryUpgradeCost](./bitburner.sleeve.getmemoryupgradecost.md)
## Sleeve.getMemoryUpgradeCost() method
Get the cost of memory upgrades.
**Signature:**
```typescript
getMemoryUpgradeCost(sleeveNumber: number, amount: number): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
sleeveNumber
</td><td>
number
</td><td>
Index of the sleeve.
</td></tr>
<tr><td>
amount
</td><td>
number
</td><td>
Number of upgrades. Must be a positive integer.
</td></tr>
</tbody></table>
**Returns:**
number
Cost of the upgrades. Return Infinity if the current memory plus the amount of upgrades is greater than 100.
## Remarks
RAM cost: 4 GB