Update documentation. Hacknet Node API functions for getting costs now return Infinity if the specified Node is at max level

This commit is contained in:
danielyxie
2018-09-26 00:00:28 -05:00
parent 12bee24520
commit 561cdb1652
9 changed files with 167321 additions and 383 deletions

View File

@@ -123,7 +123,10 @@ getLevelUpgradeCost
:param number i: Index/Identifier of Hacknet Node
:param number n: Number of levels to upgrade. Must be positive. Rounded to nearest integer
Returns the cost of upgrading the specified Hacknet Node by *n* levels
Returns the cost of upgrading the specified Hacknet Node by *n* levels.
If an invalid value for *n* is provided, then this function returns 0. If the
specified Hacknet Node is already at max level, then Infinity is returned.
getRamUpgradeCost
-----------------
@@ -134,6 +137,9 @@ getRamUpgradeCost
Returns the cost of upgrading the RAM of the specified Hacknet Node *n* times.
If an invalid value for *n* is provided, then this function returns 0. If the
specified Hacknet Node is already at max RAM, then Infinity is returned.
getCoreUpgradeCost
------------------
.. js:function:: getCoreUpgradeCost(i, n)
@@ -143,6 +149,9 @@ getCoreUpgradeCost
Returns the cost of upgrading the number of cores of the specified Hacknet Node by *n*.
If an invalid value for *n* is provided, then this function returns 0. If the
specified Hacknet Node is already at the max number of cores, then Infinity is returned.
Utilities
---------
The following functions are not officially part of the Hacknet Node API, but they