Module server.games.custom_game
Classes
class CustomGame (id, *args, **kwargs)-
Expand source code
class CustomGame(Game): init_mode = InitMode.NORMAL_LOBBY game_type = GameType.CUSTOM def __init__(self, id, *args, **kwargs): new_kwargs = { "rating_type": RatingType.GLOBAL, "setup_timeout": 30 } new_kwargs.update(kwargs) super().__init__(id, *args, **new_kwargs) async def _run_pre_rate_validity_checks(self): assert self.launched_at is not None limit = len(self.players) * 60 if not self.enforce_rating and time.time() - self.launched_at < limit: await self.mark_invalid(ValidityState.TOO_SHORT)Object that lasts for the lifetime of a game on FAF.
Ancestors
Inherited members
Game:add_game_connectionadd_resultclear_slotgame_typeget_connected_playersget_player_optionget_team_setsinit_modeis_evenis_visible_to_playerlaunchload_resultspersist_resultsplayersremove_game_connectionset_ai_optionset_name_uncheckedset_player_optionteamsupdate_game_statsvalidate_game_mode_settingsvalidate_game_settings