mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Cleaned up some of my recent Pretense code.
This commit is contained in:
parent
dc02c6f857
commit
1322c3ca54
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user