mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Don't plan BAI targets at dead subgroups.
Fixes https://github.com/Khopa/dcs_liberation/issues/900
This commit is contained in:
@@ -1013,7 +1013,8 @@ class FlightPlanBuilder:
|
||||
|
||||
targets: List[StrikeTarget] = []
|
||||
for group in location.groups:
|
||||
targets.append(StrikeTarget(f"{group.name} at {location.name}", group))
|
||||
if group.units:
|
||||
targets.append(StrikeTarget(f"{group.name} at {location.name}", group))
|
||||
|
||||
return self.strike_flightplan(
|
||||
flight, location, FlightWaypointType.INGRESS_BAI, targets
|
||||
|
||||
@@ -14,7 +14,7 @@ from typing import (
|
||||
|
||||
from dcs.mapping import Point
|
||||
from dcs.unit import Unit
|
||||
from dcs.unitgroup import VehicleGroup
|
||||
from dcs.unitgroup import Group, VehicleGroup
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
@@ -32,7 +32,7 @@ from .flight import Flight, FlightWaypoint, FlightWaypointType
|
||||
@dataclass(frozen=True)
|
||||
class StrikeTarget:
|
||||
name: str
|
||||
target: Union[VehicleGroup, TheaterGroundObject, Unit]
|
||||
target: Union[VehicleGroup, TheaterGroundObject, Unit, Group]
|
||||
|
||||
|
||||
class WaypointBuilder:
|
||||
|
||||
Reference in New Issue
Block a user