Infantry is only generated for IFV and APC groups

This commit is contained in:
Khopa 2020-12-22 23:24:27 +01:00
parent 92e9e8c56a
commit 7c29ea836c

View File

@ -675,12 +675,14 @@ class GroundConflictGenerator:
else:
g.set_skill(self.game.settings.enemy_vehicle_skill)
positioned_groups.append((g, group))
self.gen_infantry_group_for_group(
g,
is_player,
self.mission.country(country),
opposite_heading(spawn_heading)
)
if group.role in [CombatGroupRole.APC, CombatGroupRole.IFV]:
self.gen_infantry_group_for_group(
g,
is_player,
self.mission.country(country),
opposite_heading(spawn_heading)
)
else:
logging.warning(f"Unable to get valid position for {group}")