Skip to content

Commit

Permalink
Fix geckos adapters
Browse files Browse the repository at this point in the history
They are fully functional now!
  • Loading branch information
arthuro555 committed Sep 30, 2022
1 parent c57976b commit d5137ef
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion code/adapters/geckos-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ THNK.GeckosClientAdapter = class GeckosClientAdapter extends (
connection: ClientChannel | null = null;
constructor(ip: string, port: number) {
super();
this.ip = ip;
this.ip = `http://${ip}`;
this.port = port;
}

Expand Down
4 changes: 1 addition & 3 deletions code/adapters/geckos-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ const getSomeNums = () =>
THNK.GeckosServerAdapter = class GeckosServerAdapter extends (
THNK.ServerAdapter
) {
ip: string;
port: number;
id = 0;
server: GeckosServer | null = null;
httpServer: import("http").Server | null = null;
channels = new Map<string, ServerChannel>();
constructor(ip: string, port: number) {
constructor(port: number) {
super();
this.ip = ip;
this.port = port;
}

Expand Down
2 changes: 1 addition & 1 deletion code/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export class GeckosClientAdapter extends ClientAdapter {
constructor(ip: string, port: number) {}
}
export class GeckosServerAdapter extends ServerAdapter {
constructor(ip: string, port: number) {}
constructor(port: number) {}
}
export as namespace THNK;
1 change: 0 additions & 1 deletion code/server/SetupServerScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const setupSceneAsServer = (
const syncedVariable = SyncedVariable.setupSyncedVariable(
runtimeScene.getVariables()
);
runtimeScene.getTimeManager().addTimer("__THNK_Ticker");
runtimeScene.thnkServer = new THNKServerContext(adapter, syncedVariable);

// Unless "dedicated" is switched on, a server is always also a client to itself.
Expand Down
2 changes: 1 addition & 1 deletion extensions/THNK.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion extensions/THNK_GeckosClient.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions extensions/THNK_GeckosServer.json

Large diffs are not rendered by default.

0 comments on commit d5137ef

Please sign in to comment.