External API update (#2111)

* External API update

 - Remove tags field for map information
 - Remove room_policy fiels for map information

This two paramter will be used directly in the admin

* Delete use less updateRoomWithAdminData

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
Co-authored-by: David Négrier <d.negrier@thecodingmachine.com>
This commit is contained in:
grégoire parant
2022-04-25 11:00:01 +02:00
committed by GitHub
parent 03edc197d3
commit f402fea86a
6 changed files with 4 additions and 54 deletions
-10
View File
@@ -1,7 +1,6 @@
import { ExSocketInterface } from "../Model/Websocket/ExSocketInterface";
import { PositionDispatcher } from "./PositionDispatcher";
import { ViewportInterface } from "../Model/Websocket/ViewportMessage";
import { arrayIntersect } from "../Services/ArrayHelper";
import { ZoneEventListener } from "../Model/Zone";
import { apiClientRepository } from "../Services/ApiClientRepository";
import {
@@ -24,8 +23,6 @@ export enum GameRoomPolicyTypes {
export class PusherRoom {
private readonly positionNotifier: PositionDispatcher;
public tags: string[];
public policyType: GameRoomPolicyTypes;
private versionNumber: number = 1;
private backConnection!: ClientReadableStream<BatchToPusherRoomMessage>;
private isClosing: boolean = false;
@@ -33,9 +30,6 @@ export class PusherRoom {
//public readonly variables = new Map<string, string>();
constructor(public readonly roomUrl: string, private socketListener: ZoneEventListener) {
this.tags = [];
this.policyType = GameRoomPolicyTypes.ANONYMOUS_POLICY;
// A zone is 10 sprites wide.
this.positionNotifier = new PositionDispatcher(this.roomUrl, 320, 320, this.socketListener);
}
@@ -53,10 +47,6 @@ export class PusherRoom {
this.listeners.delete(socket);
}
public canAccess(userTags: string[]): boolean {
return arrayIntersect(userTags, this.tags);
}
public isEmpty(): boolean {
return this.positionNotifier.isEmpty();
}