Cleaned up some of my recent Pretense code.

This commit is contained in:
MetalStormGhost 2023-09-10 14:09:24 +03:00
parent dc02c6f857
commit 1322c3ca54
3 changed files with 4 additions and 7 deletions

View File

@ -132,7 +132,7 @@ class PretenseAircraftGenerator:
flight_type = FlightType.TRANSPORT
elif (
FlightType.SEAD in mission_types
or FlightType.SEAD_SWEEP
or FlightType.SEAD_SWEEP in mission_types
or FlightType.SEAD_ESCORT in mission_types
) and num_of_sead < 2:
flight_type = FlightType.SEAD

View File

@ -258,9 +258,6 @@ class PretenseMissionGenerator:
continue
flight.aircraft_type.assign_channels_for_flight(flight, self.mission_data)
if self.game.settings.plugins.get("ewrj"):
self._configure_ewrj(aircraft_generator)
def notify_info_generators(
self,
) -> None:

View File

@ -141,7 +141,7 @@ class PretenseGroundObjectGenerator(GroundObjectGenerator):
cp_name: str,
group_role: str,
max_num: int,
):
) -> None:
if self.ground_object.coalition.faction.has_access_to_unit_class(unit_class):
unit_type = self.ground_unit_of_class(unit_class)
if unit_type is not None and len(vehicle_units) < max_num:
@ -169,8 +169,8 @@ class PretenseGroundObjectGenerator(GroundObjectGenerator):
if self.culled:
return
for group in self.ground_object.groups:
vehicle_units = []
ship_units = []
vehicle_units: list[TheaterUnit] = []
ship_units: list[TheaterUnit] = []
# Split the different unit types to be compliant to dcs limitation
for unit in group.units:
cp_name_trimmed = "".join(