unexport AllServers

This commit is contained in:
Olivier Gagnon
2021-10-07 16:04:04 -04:00
parent 1d488565c6
commit be29481689
27 changed files with 185 additions and 159 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ import {
} from "../Hacknet/HacknetHelpers";
import { HacknetServer } from "../Hacknet/HacknetServer";
import { HacknetNode } from "../Hacknet/HacknetNode";
import { AllServers } from "../Server/AllServers";
import { getServer } from "../Server/ServerHelpers";
export interface INetscriptHacknet {
numNodes(): number;
@@ -58,7 +58,7 @@ export function NetscriptHacknet(
if (hasHacknetServers(player)) {
const hi = player.hacknetNodes[i];
if (typeof hi !== "string") throw new Error("hacknet node was not a string");
const hserver = AllServers[hi];
const hserver = getServer(hi);
if (!(hserver instanceof HacknetServer)) throw new Error("hacknet server was not actually hacknet server");
if (hserver == null) {
throw helper.makeRuntimeErrorMsg(