mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-19 15:54:09 +02:00
Refactor game options into separate components
This commit is contained in:
@@ -5,10 +5,11 @@ let server: Remote;
|
||||
|
||||
export function newRemoteFileApiConnection(): void {
|
||||
if (server) server.stopConnection();
|
||||
if (Settings.RemoteFileApiPort === 0) return;
|
||||
server = new Remote("localhost", Settings.RemoteFileApiPort);
|
||||
server.startConnection();
|
||||
}
|
||||
|
||||
export function isRemoteFileApiConnectionLive(): boolean {
|
||||
return server.connection != undefined && server.connection.readyState == 1;
|
||||
return server && server.connection != undefined && server.connection.readyState == 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user