Add shipping lane support to campaign files.

These don't actually do anything yet, this is just the campaign support
and UI.

https://github.com/Khopa/dcs_liberation/issues/826
This commit is contained in:
Dan Albert
2021-04-24 21:32:37 -07:00
parent 97b73e1a01
commit 5e67ce0ab2
6 changed files with 173 additions and 40 deletions

View File

@@ -267,6 +267,7 @@ class ControlPoint(MissionTarget, ABC):
# TODO: Should be Airbase specific.
self.has_frontline = has_frontline
self.connected_points: List[ControlPoint] = []
self.shipping_lanes: Dict[ControlPoint, List[Point]] = {}
self.convoy_spawns: Dict[ControlPoint, Point] = {}
self.base: Base = Base()
self.cptype = cptype
@@ -397,6 +398,9 @@ class ControlPoint(MissionTarget, ABC):
self.convoy_spawns[to] = convoy_location
self.stances[to.id] = CombatStance.DEFENSIVE
def create_shipping_lane(self, to: ControlPoint, waypoints: List[Point]) -> None:
self.shipping_lanes[to] = waypoints
@abstractmethod
def runway_is_operational(self) -> bool:
"""