mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-28 09:30:34 +00:00
have lobby schedule ffa, teams, & special game types (#3196)
## Description: This implements the backend for multiple lobbies in preparation for https://github.com/openfrontio/OpenFrontIO/pull/3191 The server now schedules & sends a map of game type (ffa, teams, special) => public lobbies. NOTE: this is just temporary, the lobby only shows ffa currently. Have the Master scheduler schedule ffa, teams, & special games. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: evan
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
GameMode,
|
||||
GameType,
|
||||
} from "../core/game/Game";
|
||||
import { GameConfig, GameID } from "../core/Schemas";
|
||||
import { GameConfig, GameID, PublicGameType } from "../core/Schemas";
|
||||
import { Client } from "./Client";
|
||||
import { GamePhase, GameServer } from "./GameServer";
|
||||
|
||||
@@ -57,6 +57,7 @@ export class GameManager {
|
||||
gameConfig: GameConfig | undefined,
|
||||
creatorPersistentID?: string,
|
||||
startsAt?: number,
|
||||
publicGameType?: PublicGameType,
|
||||
) {
|
||||
const game = new GameServer(
|
||||
id,
|
||||
@@ -83,6 +84,7 @@ export class GameManager {
|
||||
},
|
||||
creatorPersistentID,
|
||||
startsAt,
|
||||
publicGameType,
|
||||
);
|
||||
this.games.set(id, game);
|
||||
return game;
|
||||
|
||||
Reference in New Issue
Block a user