mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-21 05:35:45 +01:00
Add backdoored servers to connect autocompletion
This commit is contained in:
parent
2d74b493ee
commit
6a941d57ed
@ -4,7 +4,8 @@ import { getSubdirectories } from "./DirectoryServerHelpers";
|
||||
import { Aliases, GlobalAliases, substituteAliases } from "../Alias";
|
||||
import { DarkWebItems } from "../DarkWeb/DarkWebItems";
|
||||
import { IPlayer } from "../PersonObjects/IPlayer";
|
||||
import { GetServer, GetAllServers } from "../Server/AllServers";
|
||||
import { GetAllServers } from "../Server/AllServers";
|
||||
import { Server } from "../Server/Server";
|
||||
import { ParseCommand, ParseCommands } from "./Parser";
|
||||
import { HelpTexts } from "./HelpText";
|
||||
import { isScriptFilename } from "../Script/isScriptFilename";
|
||||
@ -238,16 +239,11 @@ export async function determineAllPossibilitiesForTabCompletion(
|
||||
}
|
||||
|
||||
if (isCommand("connect")) {
|
||||
// All network connections
|
||||
for (let i = 0; i < currServ.serversOnNetwork.length; ++i) {
|
||||
const serv = GetServer(currServ.serversOnNetwork[i]);
|
||||
if (serv == null) {
|
||||
continue;
|
||||
}
|
||||
allPos.push(serv.hostname);
|
||||
}
|
||||
// All directly connected and backdoored servers are reachable
|
||||
|
||||
return allPos;
|
||||
return GetAllServers()
|
||||
.filter(server => currServ.serversOnNetwork.includes(server.hostname) || (server instanceof Server && server.backdoorInstalled))
|
||||
.map(server => server.hostname);
|
||||
}
|
||||
|
||||
if (isCommand("nano") || isCommand("vim")) {
|
||||
|
Loading…
Reference in New Issue
Block a user