Add Easy Communication Setting

allow to enforce the mission setting for easy communication
cherry-pick from 2c21644
This commit is contained in:
RndName 2021-12-12 01:15:46 +01:00
parent 056851765f
commit 5d89b9ac25
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0
3 changed files with 16 additions and 0 deletions

View File

@ -5,6 +5,7 @@ Saves from 5.0.0 are not compatible with 5.1.0
## Features/Improvements
* **[Engine]** Support for DCS DCS 2.7.8.16140 and newer, including the HTS.
* **[Mission Generation]** Add Option to enforce the Easy Communication setting for the mission
## Fixes

View File

@ -137,6 +137,15 @@ class Settings:
MISSION_RESTRICTIONS_SECTION,
default=True,
)
easy_communication: Optional[bool] = choices_option(
"Easy Communication",
page=DIFFICULTY_PAGE,
section=MISSION_RESTRICTIONS_SECTION,
choices={"Player preference": None, "Enforced on": True, "Enforced off": False},
default=None,
)
battle_damage_assessment: Optional[bool] = choices_option(
"Battle damage assessment",
page=DIFFICULTY_PAGE,

View File

@ -25,6 +25,11 @@ class ForcedOptionsGenerator:
self.game.settings.external_views_allowed
)
def _set_easy_communication(self) -> None:
self.mission.forced_options.easy_communication = (
self.game.settings.easy_communication
)
def _set_labels(self) -> None:
# TODO: Fix settings to use the real type.
# TODO: Allow forcing "full" and have default do nothing.
@ -51,6 +56,7 @@ class ForcedOptionsGenerator:
def generate(self) -> None:
self._set_options_view()
self._set_external_views()
self._set_easy_communication()
self._set_labels()
self._set_unrestricted_satnav()
self._set_battle_damage_assessment()