mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Generalize commit range display for all patrols.
Fixes https://github.com/Khopa/dcs_liberation/issues/890
This commit is contained in:
parent
208d1b82b5
commit
132ba905c7
@ -16,7 +16,8 @@ Saves from 2.5 are not compatible with 2.6.
|
|||||||
|
|
||||||
## Features/Improvements
|
## Features/Improvements
|
||||||
|
|
||||||
* **[UI]** BARCAP commit ranges are now displayed by default.
|
* **[UI]** Engagement ranges are now displayed by default.
|
||||||
|
* **[UI]** Engagement range display generalized to work for all patrolling flight plans (BARCAP, TARCAP, and CAS).
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,9 @@ class DisplayOptions:
|
|||||||
waypoint_info = DisplayRule("Waypoint Information", True)
|
waypoint_info = DisplayRule("Waypoint Information", True)
|
||||||
culling = DisplayRule("Display Culling Zones", False)
|
culling = DisplayRule("Display Culling Zones", False)
|
||||||
actual_frontline_pos = DisplayRule("Display Actual Frontline Location", False)
|
actual_frontline_pos = DisplayRule("Display Actual Frontline Location", False)
|
||||||
barcap_commit_range = DisplayRule("Display selected BARCAP commit range", True)
|
patrol_engagement_range = DisplayRule(
|
||||||
|
"Display selected patrol engagement range", True
|
||||||
|
)
|
||||||
flight_paths = FlightPathOptions()
|
flight_paths = FlightPathOptions()
|
||||||
blue_threat_zones = ThreatZoneOptions("Blue")
|
blue_threat_zones = ThreatZoneOptions("Blue")
|
||||||
red_threat_zones = ThreatZoneOptions("Red")
|
red_threat_zones = ThreatZoneOptions("Red")
|
||||||
|
|||||||
@ -59,6 +59,8 @@ from gen.flights.flightplan import (
|
|||||||
FlightPlan,
|
FlightPlan,
|
||||||
FlightPlanBuilder,
|
FlightPlanBuilder,
|
||||||
InvalidObjectiveLocation,
|
InvalidObjectiveLocation,
|
||||||
|
PatrollingFlightPlan,
|
||||||
|
TarCapFlightPlan,
|
||||||
)
|
)
|
||||||
from gen.flights.traveltime import TotEstimator
|
from gen.flights.traveltime import TotEstimator
|
||||||
from qt_ui.displayoptions import DisplayOptions, ThreatZoneOptions
|
from qt_ui.displayoptions import DisplayOptions, ThreatZoneOptions
|
||||||
@ -716,13 +718,11 @@ class QLiberationMap(QGraphicsView):
|
|||||||
)
|
)
|
||||||
prev_pos = tuple(new_pos)
|
prev_pos = tuple(new_pos)
|
||||||
|
|
||||||
if selected and DisplayOptions.barcap_commit_range:
|
if selected and DisplayOptions.patrol_engagement_range:
|
||||||
self.draw_barcap_commit_range(scene, flight)
|
self.draw_patrol_commit_range(scene, flight)
|
||||||
|
|
||||||
def draw_barcap_commit_range(self, scene: QGraphicsScene, flight: Flight) -> None:
|
def draw_patrol_commit_range(self, scene: QGraphicsScene, flight: Flight) -> None:
|
||||||
if flight.flight_type is not FlightType.BARCAP:
|
if not isinstance(flight.flight_plan, PatrollingFlightPlan):
|
||||||
return
|
|
||||||
if not isinstance(flight.flight_plan, BarCapFlightPlan):
|
|
||||||
return
|
return
|
||||||
start = flight.flight_plan.patrol_start
|
start = flight.flight_plan.patrol_start
|
||||||
end = flight.flight_plan.patrol_end
|
end = flight.flight_plan.patrol_end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user