work to make documentation unified.

This commit is contained in:
Olivier Gagnon
2021-03-12 02:51:56 -05:00
parent a00c253dcb
commit 2ce6ff2041
176 changed files with 1325 additions and 916 deletions

View File

@@ -6,20 +6,18 @@ hashCost() Netscript Function
.. js:function:: hashCost(upgName)
:RAM cost: 0 GB
:param string upgName: Name of upgrade to get the cost of. Must be an exact match
:returns: Number of hashes required for the specified upgrade. The name of
the upgrade must be an exact match.
.. note:: This function is only applicable for Hacknet Servers (the upgraded version
of a Hacknet Node).
Returns the number of hashes required for the specified upgrade. The name of the
upgrade must be an exact match.
Example:
.. code:: javascript
var upgradeName = "Sell for Corporation Funds";
upgradeName = "Sell for Corporation Funds";
if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) {
hacknet.spendHashes(upgName);
}