fix typescript error en GameRoom
Reemplaza getAvailableData() que no existe en la clase Room de Colyseus con getFilterOptions() y implementación manual.
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user