added hacknet multiplier netscript function

This commit is contained in:
Olivier Gagnon
2018-05-06 14:22:29 -04:00
parent 8dba456b65
commit 39ed2c40dd
3 changed files with 64 additions and 0 deletions

View File

@@ -437,6 +437,30 @@ getHackingMultipliers
print(mults.chance);
print(mults.growth);
getHacknetMultipliers
^^^^^^^^^^^^^^^^^^^^^
.. js:function:: getHacknetMultipliers()
Returns an object containing the Player's hacknet related multipliers. These multipliers are
returned in integer forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
{
production: Player's hacknet production multiplier,
purchaseCost: Player's hacknet purchase cost multiplier,
ramCost: Player's hacknet ram cost multiplier,
coreCost: Player's hacknet core cost multiplier,
levelCost: Player's hacknet level cost multiplier
}
Example of how this can be used::
mults = getHacknetMultipliers();
print(mults.production);
print(mults.purchaseCost);
getServerMoneyAvailable
^^^^^^^^^^^^^^^^^^^^^^^