Don't order transports for incapable factions.

If these orders can't be fulfilled for the faction it will prevent the
faction from ordering any non-reserve aircraft since transports are
given priority after reserve missions, and they'll never be fulfillable.
As such, no non-reserve aircraft will ever be purchased for factions
without transport aircraft.

Factions without transport aircraft are screwed in other ways, but this
will fix their air planning for campaigns that aren't dependent on
airlift.
This commit is contained in:
Dan Albert
2021-06-20 23:41:30 -07:00
parent aa3811ad02
commit e96210f48c
4 changed files with 13 additions and 9 deletions

View File

@@ -604,14 +604,7 @@ class CoalitionMissionPlanner:
also possible for the player to exclude mission types from their squadron
designs.
"""
all_compatible = aircraft_for_task(mission_type)
for squadron in self.game.air_wing_for(self.is_player).iter_squadrons():
if (
squadron.aircraft in all_compatible
and mission_type in squadron.auto_assignable_mission_types
):
return True
return False
return self.game.air_wing_for(self.is_player).can_auto_plan(mission_type)
def critical_missions(self) -> Iterator[ProposedMission]:
"""Identifies the most important missions to plan this turn.