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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user