mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
HACKNET: Remove hacknet servers from ServerType.Foreign (#1665)
This commit is contained in:
parent
6c81e1ac67
commit
2b4410739d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user