Refactor transfers to support unfulfilled orders.

This gives a clean break between the transfer request and the type of
transport allocated to make way for transports that need to switch
types (to support driving to a port, then getting on a ship, to a train,
then back on the road, etc).

https://github.com/Khopa/dcs_liberation/issues/823
This commit is contained in:
Dan Albert
2021-04-23 18:40:31 -07:00
parent d6c84e362f
commit d80f7ebf3b
9 changed files with 227 additions and 399 deletions

View File

@@ -14,7 +14,7 @@ from game.theater.controlpoint import ControlPoint, MissionTarget
from game.utils import Distance, meters
if TYPE_CHECKING:
from game.transfers import AirliftOrder
from game.transfers import Airlift, TransferOrder
from gen.ato import Package
from gen.flights.flightplan import FlightPlan
@@ -167,7 +167,7 @@ class Flight:
arrival: ControlPoint,
divert: Optional[ControlPoint],
custom_name: Optional[str] = None,
cargo: Optional[AirliftOrder] = None,
cargo: Optional[TransferOrder] = None,
) -> None:
self.package = package
self.country = country