Merge pull request #228 from hydroflame/ns-hacknet-multiplier

NS function to get player's hacknet multipliers
This commit is contained in:
danielyxie
2018-05-09 02:16:14 -05:00
committed by GitHub
3 changed files with 65 additions and 1 deletions
+25 -1
View File
@@ -422,7 +422,7 @@ getHackingMultipliers
.. js:function:: getHackingMultipliers()
Returns an object containing the Player's hacking related multipliers. These multipliers are
returned in integer forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
returned in fractional forms, not percentages (e.g. 1.5 instead of 150%). The object has the following structure::
{
chance: Player's hacking chance multiplier,
@@ -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 fractional 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
^^^^^^^^^^^^^^^^^^^^^^^