mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-13 11:13:50 +01:00
Start RFA connection on gamestart, test connection on bauble creation immediately
This commit is contained in:
parent
5fc67c328b
commit
2628dc1ae8
@ -16,7 +16,7 @@ export class ConnectionBauble extends React.Component<baubleProps> {
|
|||||||
constructor(props: baubleProps) {
|
constructor(props: baubleProps) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
connection: false,
|
connection: props.callback(),
|
||||||
callback: props.callback
|
callback: props.callback
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,10 @@ import { Remote } from "./Remote";
|
|||||||
let server: Remote;
|
let server: Remote;
|
||||||
|
|
||||||
export function newRemoteFileApiConnection() : void {
|
export function newRemoteFileApiConnection() : void {
|
||||||
if(server == undefined)
|
if(server == undefined) {
|
||||||
server = new Remote("localhost", Settings.RemoteFileApiPort);
|
server = new Remote("localhost", Settings.RemoteFileApiPort);
|
||||||
|
server.startConnection();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
server.stopConnection();
|
server.stopConnection();
|
||||||
server = new Remote("localhost", Settings.RemoteFileApiPort);
|
server = new Remote("localhost", Settings.RemoteFileApiPort);
|
||||||
|
Loading…
Reference in New Issue
Block a user