mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Update netscript documentation.
Unfortunately, I haven't used most of the specialty APIs yet, so I'm not intimately familiar with where their documentation might be wrong. I figured some fixes were better than no fixes, and I can always make more fixes later. Fixes #1023.
This commit is contained in:
@@ -6,21 +6,28 @@ constants() Netscript Function
|
||||
:RAM cost: 0 GB
|
||||
:returns: A structure with various constants related to hacknet nodes.
|
||||
|
||||
If you are not in BitNode-5, then you must have Source-File 5-1 in order to
|
||||
use this function.
|
||||
|
||||
Returns an object with the following properties::
|
||||
|
||||
{
|
||||
MoneyGainPerLevel: Multiplied by the node's level to get the node's base income
|
||||
BaseCost: A multiplier used when buying new nodes or upgrading levels
|
||||
LevelBaseCost: A multiplier used when upgrading levels
|
||||
RamBaseCost: A multiplier used when upgrading RAM
|
||||
CoreBaseCost: A multiplier used when buying additional cores
|
||||
PurchaseNextMult: The root of an exponent used when buying new nodes
|
||||
UpgradeLevelMult: The root of an exponent used when upgrading levels
|
||||
UpgradeRamMult: The root of an exponent used when upgrading RAM
|
||||
UpgradeCoreMult: The root of an exponent used when buying additional cores
|
||||
MaxLevel: Maximum level a node can have
|
||||
MaxRam: Maximum RAM a node can have
|
||||
MaxCores: Maximum number of cores a node can have
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
MoneyGainPerLevel
|
||||
BaseCost
|
||||
LevelBaseCost
|
||||
RamBaseCost
|
||||
CoreBaseCost
|
||||
PurchaseNextMult
|
||||
UpgradeLevelMult
|
||||
UpgradeRamMult
|
||||
UpgradeCoreMult
|
||||
MaxLevel
|
||||
MaxRam
|
||||
MaxCores
|
||||
}
|
||||
tprint("Maximum RAM a hacknet node can have: "+formulas.hacknetNodes.constants().MaxRam+" GB.");
|
||||
|
||||
Reference in New Issue
Block a user