mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Inject ground units to TgoConfig preset group if fill and has no unit
This commit is contained in:
@@ -310,6 +310,13 @@ class AirbaseGroundObjectGenerator(ControlPointGroundObjectGenerator):
|
||||
and all([u in self.faction.accessible_units for u in fg.units])
|
||||
)
|
||||
if valid_fg:
|
||||
for layout in fg.layouts:
|
||||
for lg in layout.groups:
|
||||
for ug in lg.unit_groups:
|
||||
if not fg.has_unit_for_layout_group(ug) and ug.fill:
|
||||
for g in self.faction.ground_units:
|
||||
if g.unit_class in ug.unit_classes:
|
||||
fg.units.append(g)
|
||||
unit_group = fg
|
||||
assert fg
|
||||
self.armed_forces.add_or_update_force_group(fg)
|
||||
|
||||
Reference in New Issue
Block a user