This commit is contained in:
2025-08-22 20:19:15 -04:00
parent f19552929e
commit 391bf3d1f8
58 changed files with 535 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
import { CloudRegionCode } from "../../util/photon.ts";
import type Profile from "../profiles/profile.ts";
import { RoomLocation } from "./base.ts";
import { RoomInstance, RoomLocation } from "./base.ts";
export class Instance {
@@ -8,7 +9,18 @@ export class Instance {
#players: Set<Profile> = new Set();
#instanceId: number;
//#roomId: number;
//#subRoomId: number;
#location: RoomLocation;
//#name: string;
//#maxCapacity: number;
#isFull: boolean = false;
//#isPrivate: boolean;
#isInProgress: boolean = false;
#photonRegionId: string = CloudRegionCode.us;
//#photonRoomId: string;
#dataBlob?: string;
#eventId?: string
constructor(options: {
id: number,
@@ -30,10 +42,18 @@ export class Instance {
}
addPlayer(profile: Profile) {
this.#players.add(profile);
}
getCreatedAt() {
return this.#createdAt;
}
export() {
/*const inst: RoomInstance = {
roomInstanceId: this.#instanceId,
}*/
}
}

View File

@@ -53,7 +53,7 @@ export interface RoomInstance {
photonRegionId: string,
photonRoomId: string,
dataBlob?: string,
eventId?: string
eventId?: number
}
export class InstanceManager extends ServerContentBase {