Moved Player initialization point (#452)

Now initialized as side effect in PlayerObject, instead of in Player file that is imported everywhere.
This commit is contained in:
David Walker
2023-03-28 21:30:27 -07:00
committed by GitHub
parent 798da75d83
commit 8445af5f2b
15 changed files with 43 additions and 11 deletions
@@ -1,6 +1,4 @@
// Server and HacknetServer-related methods for the Player class (PlayerObject)
import { PlayerObject } from "./PlayerObject";
import { CONSTANTS } from "../../Constants";
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
@@ -11,6 +9,8 @@ import { GetServer, AddToAllServers, createUniqueRandomIp } from "../../Server/A
import { SpecialServers } from "../../Server/data/SpecialServers";
import { hasHacknetServers } from "../../Hacknet/HacknetHelpers";
import type { PlayerObject } from "./PlayerObject";
export function hasTorRouter(this: PlayerObject): boolean {
return this.getHomeComputer().serversOnNetwork.includes(SpecialServers.DarkWeb);
}