mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix convoys not spawning where they should.
This commit is contained in:
parent
d80f7ebf3b
commit
d3fdbdbca5
@ -6,6 +6,7 @@ from dataclasses import dataclass, field
|
|||||||
from functools import singledispatchmethod
|
from functools import singledispatchmethod
|
||||||
from typing import Dict, Iterator, List, Optional, TYPE_CHECKING, Type
|
from typing import Dict, Iterator, List, Optional, TYPE_CHECKING, Type
|
||||||
|
|
||||||
|
from dcs.mapping import Point
|
||||||
from dcs.unittype import FlyingType, VehicleType
|
from dcs.unittype import FlyingType, VehicleType
|
||||||
|
|
||||||
from gen.ato import Package
|
from gen.ato import Package
|
||||||
@ -246,6 +247,14 @@ class Convoy(MissionTarget, Transport):
|
|||||||
def description(self) -> str:
|
def description(self) -> str:
|
||||||
return f"In a convoy to {self.destination}"
|
return f"In a convoy to {self.destination}"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def route_start(self) -> Point:
|
||||||
|
return self.origin.convoy_spawns[self.destination]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def route_end(self) -> Point:
|
||||||
|
return self.destination.convoy_spawns[self.origin]
|
||||||
|
|
||||||
|
|
||||||
class ConvoyMap:
|
class ConvoyMap:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|||||||
@ -33,12 +33,12 @@ class ConvoyGenerator:
|
|||||||
def generate_convoy(self, convoy: Convoy) -> VehicleGroup:
|
def generate_convoy(self, convoy: Convoy) -> VehicleGroup:
|
||||||
group = self._create_mixed_unit_group(
|
group = self._create_mixed_unit_group(
|
||||||
convoy.name,
|
convoy.name,
|
||||||
convoy.origin.position,
|
convoy.route_start,
|
||||||
convoy.units,
|
convoy.units,
|
||||||
convoy.player_owned,
|
convoy.player_owned,
|
||||||
)
|
)
|
||||||
group.add_waypoint(
|
group.add_waypoint(
|
||||||
convoy.destination.position,
|
convoy.route_end,
|
||||||
speed=kph(40).kph,
|
speed=kph(40).kph,
|
||||||
move_formation=PointAction.OnRoad,
|
move_formation=PointAction.OnRoad,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user