fix typescript error en GameRoom
All checks were successful
build-and-deploy / build (push) Successful in 32s
build-and-deploy / deploy (push) Successful in 0s

Reemplaza getAvailableData() que no existe en la clase Room de Colyseus
con getFilterOptions() y implementación manual.
This commit is contained in:
2025-08-16 01:24:39 -06:00
parent b2e3bd5a97
commit d378760b05

View File

@@ -7,7 +7,7 @@ import { broadcastDashboardUpdate } from "../adminApi";
export class GameRoom extends Room<GameState> { export class GameRoom extends Room<GameState> {
maxClients = 2; maxClients = 2;
getAvailableData() { getFilterOptions() {
// If waiting for shuffled players, report as available regardless of current client count // If waiting for shuffled players, report as available regardless of current client count
if (this.isWaitingForShuffledPlayers) { if (this.isWaitingForShuffledPlayers) {
return { return {
@@ -16,7 +16,11 @@ export class GameRoom extends Room<GameState> {
metadata: this.metadata metadata: this.metadata
}; };
} }
return super.getAvailableData(); return {
clients: this.clients.length,
maxClients: this.maxClients,
metadata: this.metadata
};
} }
hasReachedMaxClients() { hasReachedMaxClients() {