diff --git a/game/layout/layout.py b/game/layout/layout.py index f81a3136..45b7878d 100644 --- a/game/layout/layout.py +++ b/game/layout/layout.py @@ -129,6 +129,10 @@ class TgoLayoutGroup: self, go: TheaterGroundObject, unit_type: Type[DcsUnitType], amount: int ) -> list[TheaterUnit]: """Generate units of the given unit type and amount for the TgoLayoutGroup""" + if amount > len(self.layout_units): + raise LayoutException( + f"{self.name} has incorrect unit_count for {unit_type.id}" + ) return [ TheaterUnit.from_template(i, unit_type, self.layout_units[i], go) for i in range(amount) diff --git a/resources/layouts/anti_air/legacy_ground_templates.miz b/resources/layouts/anti_air/legacy_ground_templates.miz index e4e354ed..81f53bda 100644 Binary files a/resources/layouts/anti_air/legacy_ground_templates.miz and b/resources/layouts/anti_air/legacy_ground_templates.miz differ