mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 17:53:00 +02:00
huh?
This commit is contained in:
@@ -18,12 +18,13 @@ export function hasTorRouter(this: IPlayer): boolean {
|
||||
|
||||
export function getCurrentServer(this: IPlayer): BaseServer {
|
||||
const server = GetServer(this.currentServer);
|
||||
if (server === null) throw new Error("somehow connected to a server that does not exist.");
|
||||
if (server === null) throw new Error(`somehow connected to a server that does not exist. ${this.currentServer}`);
|
||||
return server;
|
||||
}
|
||||
|
||||
export function getHomeComputer(this: IPlayer): Server {
|
||||
const home = GetServer("home");
|
||||
console.log(home);
|
||||
if (home instanceof Server) return home;
|
||||
throw new Error("home computer was not a normal server");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user