mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Don't plan BAI targets at dead subgroups.
Fixes https://github.com/Khopa/dcs_liberation/issues/900
This commit is contained in:
parent
831516c5f5
commit
6200ec8e0e
@ -9,6 +9,7 @@ Saves from 2.4 are not compatible with 2.5.
|
|||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
* **[Flight Planner]** Front lines now project threat zones, so TARCAP/escorts will not be pruned for flights near the front. Packages may also route around the front line when practical.
|
* **[Flight Planner]** Front lines now project threat zones, so TARCAP/escorts will not be pruned for flights near the front. Packages may also route around the front line when practical.
|
||||||
|
* **[Flight Planner]** Fixed error when planning BAI at SAMs with dead subgroups.
|
||||||
|
|
||||||
# 2.4.3
|
# 2.4.3
|
||||||
|
|
||||||
|
|||||||
@ -1013,7 +1013,8 @@ class FlightPlanBuilder:
|
|||||||
|
|
||||||
targets: List[StrikeTarget] = []
|
targets: List[StrikeTarget] = []
|
||||||
for group in location.groups:
|
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(
|
return self.strike_flightplan(
|
||||||
flight, location, FlightWaypointType.INGRESS_BAI, targets
|
flight, location, FlightWaypointType.INGRESS_BAI, targets
|
||||||
|
|||||||
@ -14,7 +14,7 @@ from typing import (
|
|||||||
|
|
||||||
from dcs.mapping import Point
|
from dcs.mapping import Point
|
||||||
from dcs.unit import Unit
|
from dcs.unit import Unit
|
||||||
from dcs.unitgroup import VehicleGroup
|
from dcs.unitgroup import Group, VehicleGroup
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from game import Game
|
from game import Game
|
||||||
@ -32,7 +32,7 @@ from .flight import Flight, FlightWaypoint, FlightWaypointType
|
|||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class StrikeTarget:
|
class StrikeTarget:
|
||||||
name: str
|
name: str
|
||||||
target: Union[VehicleGroup, TheaterGroundObject, Unit]
|
target: Union[VehicleGroup, TheaterGroundObject, Unit, Group]
|
||||||
|
|
||||||
|
|
||||||
class WaypointBuilder:
|
class WaypointBuilder:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user