mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 20:55: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
|
* 'serverType' property
|
||||||
*/
|
*/
|
||||||
function isValidServer(s: BaseServer): boolean {
|
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;
|
const type = props.serverType;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ServerType.All:
|
case ServerType.All:
|
||||||
@ -43,9 +43,9 @@ export function ServerDropdown(props: IProps): React.ReactElement {
|
|||||||
case ServerType.Foreign:
|
case ServerType.Foreign:
|
||||||
return s.hostname !== "home" && !purchased;
|
return s.hostname !== "home" && !purchased;
|
||||||
case ServerType.Owned:
|
case ServerType.Owned:
|
||||||
return purchased || s instanceof HacknetServer || s.hostname === "home";
|
return purchased || s.hostname === "home";
|
||||||
case ServerType.Purchased:
|
case ServerType.Purchased:
|
||||||
return purchased || s instanceof HacknetServer;
|
return purchased;
|
||||||
default:
|
default:
|
||||||
console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`);
|
console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user