chore: change styling
Some checks failed
Deploy to Production / test (push) Failing after 34s

This commit is contained in:
syntaxbullet
2026-04-02 19:05:36 +02:00
parent e0dcfe6abe
commit abca1922f2
44 changed files with 427 additions and 7180 deletions

View File

@@ -60,15 +60,17 @@ export class RoomManager {
const room = this.rooms.get(roomId);
if (!room) return { ok: false, error: "Room not found" };
// Reconnecting player: must be checked before the in-progress spectator guard.
if (preferAs !== "spectator" && room.players.includes(playerId)) {
room.spectators.delete(playerId);
return { ok: true, joinedAs: "player", started: room.status === "playing" };
}
if (preferAs === "spectator" || room.status !== "waiting") {
room.spectators.add(playerId);
return { ok: true, joinedAs: "spectator", started: room.status === "playing" };
}
if (room.players.includes(playerId)) {
return { ok: true, joinedAs: "player", started: false };
}
const plugin = gameRegistry.get(room.gameSlug)!;
const isAdmin = role === "admin";