mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 14:59:16 +02:00
Fix #1863: Add getHashUpgrades hacknet function
Adds a new functions ofr hacknet servers that returns the list of available hash upgrades.
This commit is contained in:
34
markdown/bitburner.hacknet.gethashupgrades.md
Normal file
34
markdown/bitburner.hacknet.gethashupgrades.md
Normal file
@@ -0,0 +1,34 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Hacknet](./bitburner.hacknet.md) > [getHashUpgrades](./bitburner.hacknet.gethashupgrades.md)
|
||||
|
||||
## Hacknet.getHashUpgrades() method
|
||||
|
||||
Get the list of hash upgrades
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getHashUpgrades(): string[];
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
string\[\]
|
||||
|
||||
An array containing the available upgrades
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0 GB
|
||||
|
||||
This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).
|
||||
|
||||
Returns the list of all available hash upgrades that can be used in the spendHashes function.
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
```ts
|
||||
const upgrades = hacknet.getHashUpgrades(); // ["Sell for Money","Sell for Corporation Funds",...]
|
||||
```
|
||||
|
||||
@@ -23,6 +23,7 @@ Not all these functions are immediately available.
|
||||
| [getCacheUpgradeCost(index, n)](./bitburner.hacknet.getcacheupgradecost.md) | Calculate the cost of upgrading hacknet node cache. |
|
||||
| [getCoreUpgradeCost(index, n)](./bitburner.hacknet.getcoreupgradecost.md) | Calculate the cost of upgrading hacknet node cores. |
|
||||
| [getHashUpgradeLevel(upgName)](./bitburner.hacknet.gethashupgradelevel.md) | Get the level of a hash upgrade. |
|
||||
| [getHashUpgrades()](./bitburner.hacknet.gethashupgrades.md) | Get the list of hash upgrades |
|
||||
| [getLevelUpgradeCost(index, n)](./bitburner.hacknet.getlevelupgradecost.md) | Calculate the cost of upgrading hacknet node levels. |
|
||||
| [getNodeStats(index)](./bitburner.hacknet.getnodestats.md) | Get the stats of a hacknet node. |
|
||||
| [getPurchaseNodeCost()](./bitburner.hacknet.getpurchasenodecost.md) | Get the price of the next hacknet node. |
|
||||
|
||||
Reference in New Issue
Block a user