Module server.games.custom_game
Classes
class CustomGame (id, *args, **kwargs)
-
Object that lasts for the lifetime of a game on FAF.
Expand source code
@with_logger 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): limit = len(self.players) * 60 if not self.enforce_rating and time.time() - self.launched_at < limit: await self.mark_invalid(ValidityState.TOO_SHORT)
Ancestors
Class variables
var game_type
var init_mode
Inherited members
Game
:add_game_connection
add_result
clear_slot
get_connected_players
get_player_option
get_team_sets
is_even
is_visible_to_player
launch
load_results
persist_results
players
remove_game_connection
set_ai_option
set_name_unchecked
set_player_option
teams
update_game_stats
validate_game_mode_settings
validate_game_settings