Ensure that a transit path exists for recruitment.

Networks can be disconnected even by airlift because FOBs are not
airports.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1147
This commit is contained in:
Dan Albert
2021-05-28 16:26:21 -07:00
parent d4e843983d
commit a2abdcf5d3
2 changed files with 23 additions and 3 deletions

View File

@@ -139,7 +139,9 @@ class PendingUnitDeliveries:
) -> Optional[ControlPoint]:
sources = []
for control_point in game.theater.control_points_for(self.destination.captured):
if control_point.can_recruit_ground_units(game):
if control_point.can_recruit_ground_units(
game
) and network.has_path_between(self.destination, control_point):
sources.append(control_point)
if not sources: