From 2b4410739d8f8edc11c6485a63a27fe0f06dd076 Mon Sep 17 00:00:00 2001 From: Yichi Zhang Date: Wed, 25 Sep 2024 16:19:25 -0700 Subject: [PATCH] HACKNET: Remove hacknet servers from ServerType.Foreign (#1665) --- src/ui/React/ServerDropdown.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/React/ServerDropdown.tsx b/src/ui/React/ServerDropdown.tsx index 71eab2fac..3e4bdedea 100644 --- a/src/ui/React/ServerDropdown.tsx +++ b/src/ui/React/ServerDropdown.tsx @@ -35,7 +35,7 @@ export function ServerDropdown(props: IProps): React.ReactElement { * 'serverType' property */ function isValidServer(s: BaseServer): boolean { - const purchased = s instanceof Server && s.purchasedByPlayer; + const purchased = (s instanceof Server && s.purchasedByPlayer) || s instanceof HacknetServer; const type = props.serverType; switch (type) { case ServerType.All: @@ -43,9 +43,9 @@ export function ServerDropdown(props: IProps): React.ReactElement { case ServerType.Foreign: return s.hostname !== "home" && !purchased; case ServerType.Owned: - return purchased || s instanceof HacknetServer || s.hostname === "home"; + return purchased || s.hostname === "home"; case ServerType.Purchased: - return purchased || s instanceof HacknetServer; + return purchased; default: console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`); return false;