Added maxNumNodes to the hacknet API

This commit is contained in:
Olivier Gagnon
2021-03-07 16:03:21 -05:00
parent 58e38faad6
commit dabb5016fc
5 changed files with 14 additions and 2 deletions
+4 -1
View File
@@ -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();
},