This commit is contained in:
Olivier Gagnon
2021-11-17 19:56:17 -05:00
parent 6cf0455215
commit c69eb34341
237 changed files with 132 additions and 4979 deletions

View File

@@ -1,17 +0,0 @@
getCacheUpgradeCost() Netscript Function
========================================
.. warning:: This page contains spoilers for the game
.. js:function:: getCacheUpgradeCost(i, n)
:RAM cost: 0 GB
:param number i: Index of Hacknet Node. :ref:`See here for details <netscript_hacknetnodeapi_referencingahacknetnode>`
:param number n: Number of times to upgrade cache. Must be positive. Rounded to nearest integer
:return: Cost of upgrading the cache level of the specified Hacknet Server by ``n``.
.. note:: This function is only applicable for Hacknet Servers (the upgraded version of
a Hacknet Node).
If an invalid value for ``n`` is provided, then this function returns ``0``. If the
specified Hacknet Server is already at the max cache level, then ``Infinity`` is returned.

View File

@@ -1,18 +0,0 @@
getHashUpgradeLevel() Netscript Function
========================================
.. js:function:: getHashUpgradeLevel(upgName)
:RAM cost: 0 GB
:param string upgName: Name of upgrade to spend hashes on. Must be an exact match.
:returns: level of the upgrade.
.. note:: This function is only applicable for Hacknet Servers (the upgraded version
of a Hacknet Node).
Example:
.. code:: javascript
hacknet.getHashUpgradeLevel("Sell for Money"); // returns: 5
// "Sell for Money" was bought 5 times.

View File

@@ -1,13 +0,0 @@
getStudyMult() Netscript Function
=================================
.. js:function:: getStudyMult()
:RAM cost: 0 GB
:returns: The multiplier to studying that hash upgrades provide to the player.
Example:
.. code:: javascript
hacknet.getStudyMult(); // return: 1.4

View File

@@ -1,13 +0,0 @@
getTrainingMult() Netscript Function
===================================
.. js:function:: getTrainingMult()
:RAM cost: 0 GB
:returns: The multiplier to training that hash upgrades provide to the player.
Example:
.. code:: javascript
hacknet.getTrainingMult(); // return: 1.4

View File

@@ -1,12 +0,0 @@
hashCapacity() Netscript Function
=================================
.. warning:: This page contains spoilers for the game
.. js:function:: hashCapacity()
:RAM cost: 0 GB
:returns: The players maximum hash capacity.
.. note:: This function is only applicable for Hacknet Servers (the upgraded version of
a Hacknet Node).

View File

@@ -1,23 +0,0 @@
hashCost() Netscript Function
=============================
.. warning:: This page contains spoilers for the game
.. 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).
Example:
.. code:: javascript
upgradeName = "Sell for Corporation Funds";
if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) {
hacknet.spendHashes(upgName);
}

View File

@@ -1,7 +0,0 @@
maxNumNodes() Netscript Function
================================
.. js:function:: maxNumNodes()
:RAM cost: 0 GB
:returns: Maximum number of Hacknet Nodes you can own, unless you have not unlocked HackNet servers. Then, it returns Infinity.

View File

@@ -1,13 +0,0 @@
numHashes() Netscript Function
==============================
.. warning:: This page contains spoilers for the game
.. js:function:: numHashes()
:RAM cost: 0 GB
:returns: Number of hashes you have.
.. note:: This function is only applicable for Hacknet Servers (the upgraded version
of a Hacknet Node).

View File

@@ -1,28 +0,0 @@
spendHashes() Netscript Function
================================
.. warning:: This page contains spoilers for the game
.. js:function:: spendHashes(upgName, upgTarget)
:RAM cost: 0 GB
:param string upgName: Name of upgrade to spend hashes on. Must be an exact match
:param string upgTarget: Object to which upgrade applies. Required for certain upgrades
:returns: ``true`` if the purchase was successful.
.. note:: This function is only applicable for Hacknet Servers (the upgraded version
of a Hacknet Node).
Spend the hashes generated by your Hacknet Servers on an upgrade.
The name of the upgrade must be an exact match. The ``upgTarget`` argument
is used for upgrades such as ``Reduce Minimum Security``, which applies to a
specific server. In this case, the ``upgTarget`` argument must be the
hostname of the server.
Example:
.. code:: javascript
hacknet.spendHashes("Sell for Corporation Funds");
hacknet.spendHashes("Increase Maximum Money", "foodnstuff");

View File

@@ -1,16 +0,0 @@
upgradeCache() Netscript Function
=================================
.. warning:: This page contains spoilers for the game
.. js:function:: upgradeCache(i, n)
:RAM cost: 0 GB
:param number i: Index of Hacknet Node. :ref:`See here for details <netscript_hacknetnodeapi_referencingahacknetnode>`
:param number n: Number of cache levels to purchase. Must be positive. Rounded to nearest integer
:returns: ``true`` if the upgrade was successful.
.. note:: This function is only applicable for Hacknet Servers (the upgraded version of
a Hacknet Node).
Tries to upgrade the specified Hacknet Server's cache ``n`` times.