mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
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.
23 lines
743 B
Python
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
|