mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-05 07:07:50 +02:00
DEVMENU: Reset hacknet server list properly when setting level of SF9 (#2177)
This commit is contained in:
@@ -111,9 +111,9 @@ export function createUniqueRandomIp(): IPAddress {
|
||||
// Safely add a Server to the AllServers map
|
||||
export function AddToAllServers(server: Server | HacknetServer): void {
|
||||
if (GetServer(server.hostname)) {
|
||||
console.warn(`Hostname of the server thats being added: ${server.hostname}`);
|
||||
console.warn(`The server that already has this IP is: ${AllServers[server.hostname].hostname}`);
|
||||
throw new Error("Error: Trying to add a server with an existing IP");
|
||||
console.warn(`The hostname of the server that's being added is: ${server.hostname}`);
|
||||
console.warn(`The server that already has this hostname is: ${AllServers[server.hostname].hostname}`);
|
||||
throw new Error(`Error: Trying to add a server with an existing hostname. Hostname: ${server.hostname}.`);
|
||||
}
|
||||
|
||||
AllServers[server.hostname] = server;
|
||||
|
||||
Reference in New Issue
Block a user