Buckets:

download
raw
3.64 kB
from __future__ import annotations
import dataclasses
from dataclasses import dataclass
from typing import TYPE_CHECKING
from randovania.game.web_info import GameWebInfo
if TYPE_CHECKING:
from collections.abc import Callable, Iterable, Iterator
from randovania.exporter.game_exporter import GameExporter
from randovania.exporter.patch_data_factory import PatchDataFactory
from randovania.game.development_state import DevelopmentState
from randovania.game.game_test_data import GameTestData
from randovania.game.generator import GameGenerator
from randovania.game.gui import GameGui
from randovania.game.hints import GameHints
from randovania.game.layout import GameLayout
from randovania.game_description.game_description import GameDescription
from randovania.interface_common.options import PerGameOptions
@dataclass(frozen=True, kw_only=True)
class GameData:
"""Contains all game-specific behavior as required by Randovania."""
short_name: str
"""Short name, used throughout the GUI where space is limited."""
long_name: str
"""Full name, used throughout the GUI where space is not an issue."""
development_state: DevelopmentState
"""Controls how mature the game is considered to be. Various part of the UI display different games depending on
the development state.
Games start in SOURCE_ONLY, change to STAGING when somewhat usable and move to STABLE when given approval."""
presets: Iterable[str]
"""List of preset filenames that should be included by default for this game.
The file must exist in the "presets" subdirectory of the game."""
faq: Iterable[tuple[str, str]]
"""List of question to markdown-formatted response of FAQ entries."""
layout: GameLayout
"""Contains game-specific settings available for presets."""
hash_words: list[str]
"""Contains a list of hash words, which are used as a human readable way to identify generated games"""
options: Callable[[], type[PerGameOptions]]
"""Contains game-specific persisted values."""
gui: Callable[[], GameGui]
"""Contains game-specific GUI windows."""
generator: Callable[[], GameGenerator]
"""Contains game-specific generation data."""
hints: Callable[[], GameHints]
patch_data_factory: Callable[[], type[PatchDataFactory]]
exporter: Callable[[], GameExporter]
"""Capable of exporting everything needed to play the randomized game."""
test_data: Callable[[], GameTestData]
"""Contains data and configuration parameters to allow the test suit to assert things properly for this game."""
reject_undocumented_tricks_in_database: bool = True
"""If a test should check and fail if there's any undocumented trick in the database."""
defaults_available_in_game_sessions: bool = False
"""If this game is allowed by default in online game sessions."""
permalink_reference_preset: str | None = None
"""(Optional) Name of the preset used as reference to encode permalinks of this game.
If unset, the first of the list is used."""
multiple_start_nodes_per_area: bool = False
"""If this game allows multiple start nodes per area."""
web_info: GameWebInfo = dataclasses.field(default_factory=GameWebInfo)
"""Contains a handful of fields displayed primarily on the website."""
racetime_url: str | None = None
"""The URL to the racetime.gg data endpoint for this game, if available."""
logic_db_integrity: Callable[[GameDescription], Iterator[str]] = lambda game: iter(())
"""A function checking for game specific database integrity errors."""

Xet Storage Details

Size:
3.64 kB
·
Xet hash:
c7ffdc94d7fa142702efcb2e10439e12be4ae697cd4ad1d535eb0aefd59ecb6b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.