mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-21 13:45:44 +01:00
Added maxNumNodes to the hacknet API
This commit is contained in:
parent
58e38faad6
commit
dabb5016fc
8
doc/source/netscript/hacknetnodeapi/maxNumNodes.rst
Normal file
8
doc/source/netscript/hacknetnodeapi/maxNumNodes.rst
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
maxNumNodes() Netscript Function
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. js:function:: maxNumNodes()
|
||||||
|
|
||||||
|
:RAM cost: 0 GB
|
||||||
|
|
||||||
|
Returns the maximum number of Hacknet Nodes you can own.
|
@ -242,6 +242,7 @@ export let CONSTANTS: IMap<any> = {
|
|||||||
* getCharacterInformation now additionally returns exp
|
* getCharacterInformation now additionally returns exp
|
||||||
* pid resets back to 1 when installing or destroying a BitNode.
|
* pid resets back to 1 when installing or destroying a BitNode.
|
||||||
* New '.ns' scripts start with a main function.
|
* New '.ns' scripts start with a main function.
|
||||||
|
* hacknet.maxNumNodes returns the maximum number of hacknet nodes.
|
||||||
|
|
||||||
Misc.
|
Misc.
|
||||||
* Fixed an issue where SF3 was listed as infinitly repeatable and SF12 as
|
* Fixed an issue where SF3 was listed as infinitly repeatable and SF12 as
|
||||||
|
@ -52,7 +52,7 @@ import {
|
|||||||
purchaseHashUpgrade,
|
purchaseHashUpgrade,
|
||||||
updateHashManagerCapacity,
|
updateHashManagerCapacity,
|
||||||
} from "./Hacknet/HacknetHelpers";
|
} from "./Hacknet/HacknetHelpers";
|
||||||
import { HacknetServer } from "./Hacknet/HacknetServer";
|
import { HacknetServer, MaxNumberHacknetServers } from "./Hacknet/HacknetServer";
|
||||||
import { CityName } from "./Locations/data/CityNames";
|
import { CityName } from "./Locations/data/CityNames";
|
||||||
import { LocationName } from "./Locations/data/LocationNames";
|
import { LocationName } from "./Locations/data/LocationNames";
|
||||||
|
|
||||||
@ -392,6 +392,9 @@ function NetscriptFunctions(workerScript) {
|
|||||||
numNodes : function() {
|
numNodes : function() {
|
||||||
return Player.hacknetNodes.length;
|
return Player.hacknetNodes.length;
|
||||||
},
|
},
|
||||||
|
maxNumNodes : function() {
|
||||||
|
return MaxNumberHacknetServers;
|
||||||
|
},
|
||||||
purchaseNode : function() {
|
purchaseNode : function() {
|
||||||
return purchaseHacknet();
|
return purchaseHacknet();
|
||||||
},
|
},
|
||||||
|
@ -103,7 +103,7 @@ let NetscriptFunctions =
|
|||||||
// Hacknet Node API
|
// Hacknet Node API
|
||||||
"hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|" +
|
"hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|" +
|
||||||
"upgradeLevel|upgradeRam|upgradeCore|upgradeCache|getLevelUpgradeCost|" +
|
"upgradeLevel|upgradeRam|upgradeCore|upgradeCache|getLevelUpgradeCost|" +
|
||||||
"getRamUpgradeCost|getCoreUpgradeCost|getCacheUpgradeCost|" +
|
"getRamUpgradeCost|getCoreUpgradeCost|getCacheUpgradeCost|maxNumNodes|" +
|
||||||
|
|
||||||
// Gang API
|
// Gang API
|
||||||
"gang|" +
|
"gang|" +
|
||||||
|
Loading…
Reference in New Issue
Block a user