Skip to content

Commit

Permalink
Fix hashnet server list (#1779)
Browse files Browse the repository at this point in the history
Remove WD if TRP isn't installed.
  • Loading branch information
gmcew authored Nov 18, 2024
1 parent 75cf9c8 commit 93a9475
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ui/React/ServerDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import React from "react";
import { GetAllServers } from "../../Server/AllServers";
import { Server } from "../../Server/Server";
import { BaseServer } from "../../Server/BaseServer";

import { Player } from "@player";
import { HacknetServer } from "../../Hacknet/HacknetServer";
import Select, { SelectChangeEvent } from "@mui/material/Select";
import MenuItem from "@mui/material/MenuItem";
import Button from "@mui/material/Button";
import { AugmentationName } from "@enums";

// TODO make this an enum when this gets converted to TypeScript
export const ServerType = {
Expand Down Expand Up @@ -41,7 +42,9 @@ export function ServerDropdown(props: IProps): React.ReactElement {
case ServerType.All:
return true;
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:
return purchased || s.hostname === "home";
case ServerType.Purchased:
Expand Down

0 comments on commit 93a9475

Please sign in to comment.