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:
Martin Fournier
2021-12-17 05:35:17 -05:00
parent 6c5842d2e7
commit 217b94d0a0
5 changed files with 87 additions and 0 deletions

View File

@@ -12012,6 +12012,34 @@
],
"name": "getHashUpgradeLevel"
},
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!Hacknet#getHashUpgrades:member(1)",
"docComment": "/**\n * Get the list of hash upgrades\n *\n * @remarks\n *\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the list of all available hash upgrades that can be used in the spendHashes function.\n *\n * @returns An array containing the available upgrades\n *\n * @example\n * ```ts\n * const upgrades = hacknet.getHashUpgrades(); // [\"Sell for Money\",\"Sell for Corporation Funds\",...]\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "getHashUpgrades(): "
},
{
"kind": "Content",
"text": "string[]"
},
{
"kind": "Content",
"text": ";"
}
],
"isOptional": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "getHashUpgrades"
},
{
"kind": "MethodSignature",
"canonicalReference": "bitburner!Hacknet#getLevelUpgradeCost:member(1)",