dcs_liberation/game/settings/optiondescription.py
Dan Albert e2c6d6788c Persist some campaign creation options.
We should also persist mod options, but those will go in a separate file
because they aren't a part of Settings.

Plugins need some work before that can be saved here. They're not
configurable in the NGW currently, so that needs to be fixed first. It
also appears that it may not be safe to inject the settings object with
plugin options until the game is created, but that needs more
investigation (see the comment in Settings.save_player_settings).

Another obvious candidate would be the desired player mission duration,
but we need to implement custom serialization for that first.
2023-04-24 22:49:30 -07:00

23 lines
743 B
Python

from dataclasses import dataclass
from typing import Optional
SETTING_DESCRIPTION_KEY = "DCS_LIBERATION_SETTING_DESCRIPTION_KEY"
@dataclass(frozen=True)
class OptionDescription:
page: str
section: str
text: str
detail: Optional[str]
tooltip: Optional[str]
causes_expensive_game_update: bool
# If True, the player's selection for this value will be saved to settings.yaml in
# the Liberation user directory when a new game is created, and those values will be
# used by default for new games. This is conditional because many settings are not
# appropriate for cross-game persistence (economy settings are, for example, usually
# hinted by the campaign itself).
remember_player_choice: bool