Applying Prettier on pusher and back
This commit is contained in:
parent
06b7f5ba2f
commit
10c3d6dee2
71 changed files with 1848 additions and 1652 deletions
|
@ -1,9 +1,9 @@
|
|||
import {ExSocketInterface} from "_Model/Websocket/ExSocketInterface";
|
||||
import {PositionDispatcher} from "./PositionDispatcher";
|
||||
import {ViewportInterface} from "_Model/Websocket/ViewportMessage";
|
||||
import {extractDataFromPrivateRoomId, extractRoomSlugPublicRoomId, isRoomAnonymous} from "./RoomIdentifier";
|
||||
import {arrayIntersect} from "../Services/ArrayHelper";
|
||||
import {ZoneEventListener} from "_Model/Zone";
|
||||
import { ExSocketInterface } from "_Model/Websocket/ExSocketInterface";
|
||||
import { PositionDispatcher } from "./PositionDispatcher";
|
||||
import { ViewportInterface } from "_Model/Websocket/ViewportMessage";
|
||||
import { extractDataFromPrivateRoomId, extractRoomSlugPublicRoomId, isRoomAnonymous } from "./RoomIdentifier";
|
||||
import { arrayIntersect } from "../Services/ArrayHelper";
|
||||
import { ZoneEventListener } from "_Model/Zone";
|
||||
|
||||
export enum GameRoomPolicyTypes {
|
||||
ANONYMUS_POLICY = 1,
|
||||
|
@ -17,13 +17,11 @@ export class PusherRoom {
|
|||
public tags: string[];
|
||||
public policyType: GameRoomPolicyTypes;
|
||||
public readonly roomSlug: string;
|
||||
public readonly worldSlug: string = '';
|
||||
public readonly organizationSlug: string = '';
|
||||
public readonly worldSlug: string = "";
|
||||
public readonly organizationSlug: string = "";
|
||||
private versionNumber: number = 1;
|
||||
|
||||
constructor(public readonly roomId: string,
|
||||
private socketListener: ZoneEventListener)
|
||||
{
|
||||
constructor(public readonly roomId: string, private socketListener: ZoneEventListener) {
|
||||
this.public = isRoomAnonymous(roomId);
|
||||
this.tags = [];
|
||||
this.policyType = GameRoomPolicyTypes.ANONYMUS_POLICY;
|
||||
|
@ -31,7 +29,7 @@ export class PusherRoom {
|
|||
if (this.public) {
|
||||
this.roomSlug = extractRoomSlugPublicRoomId(this.roomId);
|
||||
} else {
|
||||
const {organizationSlug, worldSlug, roomSlug} = extractDataFromPrivateRoomId(this.roomId);
|
||||
const { organizationSlug, worldSlug, roomSlug } = extractDataFromPrivateRoomId(this.roomId);
|
||||
this.roomSlug = roomSlug;
|
||||
this.organizationSlug = organizationSlug;
|
||||
this.worldSlug = worldSlug;
|
||||
|
@ -41,11 +39,11 @@ export class PusherRoom {
|
|||
this.positionNotifier = new PositionDispatcher(this.roomId, 320, 320, this.socketListener);
|
||||
}
|
||||
|
||||
public setViewport(socket : ExSocketInterface, viewport: ViewportInterface): void {
|
||||
public setViewport(socket: ExSocketInterface, viewport: ViewportInterface): void {
|
||||
this.positionNotifier.setViewport(socket, viewport);
|
||||
}
|
||||
|
||||
public leave(socket : ExSocketInterface){
|
||||
public leave(socket: ExSocketInterface) {
|
||||
this.positionNotifier.removeViewport(socket);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue