import { GameKeyword, GameMap } from "@skeldjs/constant"; import { CancelableEvent } from "@skeldjs/events"; import { GameListing } from "@skeldjs/protocol"; import { Connection } from "../../../worker"; /** * Emitted when a connection enters the "public games" section and begins looking * for games. Can be used to fetch game listing sources from external sources, * just to return your own list of games, or cancel searching altogether. */ export declare class WorkerGetGameListEvent extends CancelableEvent { /** * The client that is looking for a game. */ readonly client: Connection; /** * The chat language that returned rooms should be using. */ readonly chatLanguage: GameKeyword; /** * The map that returned rooms should be on. */ readonly gameMap: GameMap; /** * The number of impostors that should be used in the returned rooms. */ readonly numImpostors: number; /** * The rooms that will be returned back to the client, unless changed with * {@link WorkerGetGameListEvent.setGames}. */ readonly games: GameListing[]; static eventName: "worker.getgamelist"; eventName: "worker.getgamelist"; private _alteredGames; constructor( /** * The client that is looking for a game. */ client: Connection, /** * The chat language that returned rooms should be using. */ chatLanguage: GameKeyword, /** * The map that returned rooms should be on. */ gameMap: GameMap, /** * The number of impostors that should be used in the returned rooms. */ numImpostors: number, /** * The rooms that will be returned back to the client, unless changed with * {@link WorkerGetGameListEvent.setGames}. */ games: GameListing[]); /** * The games that will be returned instead, if modified with {@link WorkerGetGameListEvent.setGames}. */ get alteredGames(): GameListing[]; /** * Change the games that will be returned back to the client. * @param games The games that should be returned instead. */ setGames(games: GameListing[]): void; }