Make EPLRS configurable

Resolves #517
This commit is contained in:
Raffson 2025-06-07 22:04:56 +02:00
parent 2d15db1932
commit f3ed25b5b2
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
4 changed files with 12 additions and 4 deletions

View File

@ -5,6 +5,7 @@
* **[Plugins]** Improvements to AI support for EW Script 2.0
* **[Config]** New preference setting to trigger the first-start window on every start (could help in scenarios multiple Retribution instances need to run concurrently)
* **[Modding]** Update Grinelli Designs F-22A Mod to 2.0.0 (May 2025)
* **[Options]** New option to control EPLRS-task injection in mission generator
## Fixes
* **[Flight Plans]** Fixed a bug when a package was created with only escort flights

View File

@ -192,7 +192,8 @@ class AircraftBehavior:
@staticmethod
def configure_eplrs(group: FlyingGroup[Any], flight: Flight) -> None:
if flight.unit_type.eplrs_capable:
eplrs_enabled = flight.coalition.game.settings.eplrs_enabled
if eplrs_enabled and flight.unit_type.eplrs_capable:
group.points[0].tasks.append(EPLRS(group.id))
def configure_cap(self, group: FlyingGroup[Any], flight: Flight) -> None:

View File

@ -386,9 +386,9 @@ class GroundObjectGenerator:
)
self._register_theater_unit(unit, static_group.units[0])
@staticmethod
def enable_eplrs(group: VehicleGroup, unit_type: Type[VehicleType]) -> None:
if unit_type.eplrs:
def enable_eplrs(self, group: VehicleGroup, unit_type: Type[VehicleType]) -> None:
eplrs_enabled = self.game.settings.eplrs_enabled
if eplrs_enabled and unit_type.eplrs:
group.points[0].tasks.append(EPLRS(group.id))
def set_alarm_state(self, group: MovingGroup[Any]) -> None:

View File

@ -816,6 +816,12 @@ class Settings:
GAMEPLAY_SECTION,
default=True,
)
eplrs_enabled: bool = boolean_option(
"Enable EPLRS",
MISSION_GENERATOR_PAGE,
GAMEPLAY_SECTION,
default=True,
)
generate_dark_kneeboard: bool = boolean_option(
"Generate dark kneeboard",
MISSION_GENERATOR_PAGE,