mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add AI planning for airlifts.
Downside to the current implementation is that whether or not transports that were purchased last turn will be available for airlift this turn is arbitrary. This is because transfers are created at the same time as units are delivered, and units are delivered in an arbitrary order per CP. If the helicopters are delivered before the ground units they'll have access to the transports, otherwise they'll be refunded. This will be fixed later when I rework the transfer requests to not require immediate fulfillment. https://github.com/Khopa/dcs_liberation/issues/825
This commit is contained in:
@@ -344,10 +344,8 @@ class ControlPoint(MissionTarget, ABC):
|
||||
if not game.settings.enable_new_ground_unit_recruitment:
|
||||
return True
|
||||
|
||||
from game.theater.supplyroutes import SupplyRoute
|
||||
|
||||
for cp in SupplyRoute.for_control_point(self):
|
||||
if cp.can_recruit_ground_units(game):
|
||||
for cp in game.theater.controlpoints:
|
||||
if cp.is_friendly(self.captured) and cp.can_recruit_ground_units(game):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user