mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +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
|
||||
* pid resets back to 1 when installing or destroying a BitNode.
|
||||
* New '.ns' scripts start with a main function.
|
||||
* hacknet.maxNumNodes returns the maximum number of hacknet nodes.
|
||||
|
||||
Misc.
|
||||
* Fixed an issue where SF3 was listed as infinitly repeatable and SF12 as
|
||||
|
@ -52,7 +52,7 @@ import {
|
||||
purchaseHashUpgrade,
|
||||
updateHashManagerCapacity,
|
||||
} from "./Hacknet/HacknetHelpers";
|
||||
import { HacknetServer } from "./Hacknet/HacknetServer";
|
||||
import { HacknetServer, MaxNumberHacknetServers } from "./Hacknet/HacknetServer";
|
||||
import { CityName } from "./Locations/data/CityNames";
|
||||
import { LocationName } from "./Locations/data/LocationNames";
|
||||
|
||||
@ -392,6 +392,9 @@ function NetscriptFunctions(workerScript) {
|
||||
numNodes : function() {
|
||||
return Player.hacknetNodes.length;
|
||||
},
|
||||
maxNumNodes : function() {
|
||||
return MaxNumberHacknetServers;
|
||||
},
|
||||
purchaseNode : function() {
|
||||
return purchaseHacknet();
|
||||
},
|
||||
|
@ -103,7 +103,7 @@ let NetscriptFunctions =
|
||||
// Hacknet Node API
|
||||
"hacknet|numNodes|purchaseNode|getPurchaseNodeCost|getNodeStats|" +
|
||||
"upgradeLevel|upgradeRam|upgradeCore|upgradeCache|getLevelUpgradeCost|" +
|
||||
"getRamUpgradeCost|getCoreUpgradeCost|getCacheUpgradeCost|" +
|
||||
"getRamUpgradeCost|getCoreUpgradeCost|getCacheUpgradeCost|maxNumNodes|" +
|
||||
|
||||
// Gang API
|
||||
"gang|" +
|
||||
|
Loading…
Reference in New Issue
Block a user