Fix hashnet server list (#1779)

Remove WD if TRP isn't installed.
This commit is contained in:
gmcew 2024-11-18 22:23:01 +00:00 committed by GitHub
parent 75cf9c88b5
commit 93a9475b8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -7,11 +7,12 @@ import React from "react";
import { GetAllServers } from "../../Server/AllServers"; import { GetAllServers } from "../../Server/AllServers";
import { Server } from "../../Server/Server"; import { Server } from "../../Server/Server";
import { BaseServer } from "../../Server/BaseServer"; import { BaseServer } from "../../Server/BaseServer";
import { Player } from "@player";
import { HacknetServer } from "../../Hacknet/HacknetServer"; import { HacknetServer } from "../../Hacknet/HacknetServer";
import Select, { SelectChangeEvent } from "@mui/material/Select"; import Select, { SelectChangeEvent } from "@mui/material/Select";
import MenuItem from "@mui/material/MenuItem"; import MenuItem from "@mui/material/MenuItem";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import { AugmentationName } from "@enums";
// TODO make this an enum when this gets converted to TypeScript // TODO make this an enum when this gets converted to TypeScript
export const ServerType = { export const ServerType = {
@ -41,7 +42,9 @@ export function ServerDropdown(props: IProps): React.ReactElement {
case ServerType.All: case ServerType.All:
return true; return true;
case ServerType.Foreign: case ServerType.Foreign:
return s.hostname !== "home" && !purchased; return s.hostname !== "home" && !purchased && !Player.hasAugmentation(AugmentationName.TheRedPill, true)
? s.hostname !== "w0r1d_d43m0n"
: true;
case ServerType.Owned: case ServerType.Owned:
return purchased || s.hostname === "home"; return purchased || s.hostname === "home";
case ServerType.Purchased: case ServerType.Purchased: