diff --git a/game/pretense/pretensetgogenerator.py b/game/pretense/pretensetgogenerator.py index 74f99a6e..aa1ee203 100644 --- a/game/pretense/pretensetgogenerator.py +++ b/game/pretense/pretensetgogenerator.py @@ -91,7 +91,11 @@ if TYPE_CHECKING: FARP_FRONTLINE_DISTANCE = 10000 AA_CP_MIN_DISTANCE = 40000 -PRETENSE_GROUND_UNIT_GROUP_SIZE = 4 +PRETENSE_GROUND_UNIT_GROUP_SIZE = 5 +PRETENSE_GROUND_UNITS_TO_REMOVE_FROM_ASSAULT = [ + vehicles.Armor.Stug_III, + vehicles.Artillery.Grad_URAL, +] class PretenseGroundObjectGenerator(GroundObjectGenerator): @@ -131,6 +135,12 @@ class PretenseGroundObjectGenerator(GroundObjectGenerator): ) of_class = list({u for u in faction_units if u.unit_class is unit_class}) + # Remove units from list with known pathfinding issues in Pretense missions + for unit_to_remove in PRETENSE_GROUND_UNITS_TO_REMOVE_FROM_ASSAULT: + for groundunittype_to_remove in GroundUnitType.for_dcs_type(unit_to_remove): + if groundunittype_to_remove in of_class: + of_class.remove(groundunittype_to_remove) + if len(of_class) > 0: return random.choice(of_class) else: @@ -200,6 +210,14 @@ class PretenseGroundObjectGenerator(GroundObjectGenerator): group_name = f"{cp_name_trimmed}-{group_role}-{group.id}" group.name = group_name + self.generate_ground_unit_of_class( + UnitClass.TANK, + group, + vehicle_units, + cp_name_trimmed, + group_role, + PRETENSE_GROUND_UNIT_GROUP_SIZE - 4, + ) self.generate_ground_unit_of_class( UnitClass.TANK, group, @@ -232,14 +250,6 @@ class PretenseGroundObjectGenerator(GroundObjectGenerator): group_role, PRETENSE_GROUND_UNIT_GROUP_SIZE, ) - self.generate_ground_unit_of_class( - UnitClass.ARTILLERY, - group, - vehicle_units, - cp_name_trimmed, - group_role, - PRETENSE_GROUND_UNIT_GROUP_SIZE, - ) self.generate_ground_unit_of_class( UnitClass.RECON, group,