mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Clean up debug display options.
This commit is contained in:
parent
bff905fae5
commit
575f4e1786
@ -70,13 +70,19 @@ class NavMeshOptions(DisplayGroup):
|
||||
self.red_navmesh = DisplayRule("DEBUG Show red navmesh", False)
|
||||
|
||||
|
||||
class PathDebugFactionOptions(DisplayGroup):
|
||||
def __init__(self) -> None:
|
||||
super().__init__("Faction for path debugging", debug_only=True)
|
||||
self.blue = DisplayRule("Debug blue paths", True)
|
||||
self.red = DisplayRule("Debug red paths", False)
|
||||
|
||||
|
||||
class PathDebugOptions(DisplayGroup):
|
||||
def __init__(self) -> None:
|
||||
super().__init__("Shortest paths", debug_only=True)
|
||||
self.hide = DisplayRule("DEBUG Hide paths", True)
|
||||
self.shortest_path = DisplayRule("DEBUG Show shortest path", False)
|
||||
self.blue_tarcap = DisplayRule("DEBUG Show blue TARCAP plan", False)
|
||||
self.red_tarcap = DisplayRule("DEBUG Show red TARCAP plan", False)
|
||||
self.tarcap = DisplayRule("DEBUG Show TARCAP plan", False)
|
||||
|
||||
|
||||
class DisplayOptions:
|
||||
@ -95,6 +101,7 @@ class DisplayOptions:
|
||||
blue_threat_zones = ThreatZoneOptions("Blue")
|
||||
red_threat_zones = ThreatZoneOptions("Red")
|
||||
navmeshes = NavMeshOptions()
|
||||
path_debug_faction = PathDebugFactionOptions()
|
||||
path_debug = PathDebugOptions()
|
||||
|
||||
@classmethod
|
||||
|
||||
@ -1046,14 +1046,16 @@ class QLiberationMap(QGraphicsView):
|
||||
if DisplayOptions.navmeshes.red_navmesh:
|
||||
self.highlight_mouse_navmesh(
|
||||
self.scene(), self.game.red_navmesh, mouse_world_pos)
|
||||
if DisplayOptions.path_debug.shortest_path:
|
||||
self.draw_shortest_path(self.scene(), self.game.red_navmesh,
|
||||
mouse_world_pos, player=False)
|
||||
|
||||
if DisplayOptions.path_debug.blue_tarcap:
|
||||
self.draw_tarcap_plan(self.scene(), mouse_world_pos, player=True)
|
||||
if DisplayOptions.path_debug.red_tarcap:
|
||||
self.draw_tarcap_plan(self.scene(), mouse_world_pos, player=False)
|
||||
debug_blue = DisplayOptions.path_debug_faction.blue
|
||||
if DisplayOptions.path_debug.shortest_path:
|
||||
self.draw_shortest_path(
|
||||
self.scene(), self.game.navmesh_for(player=debug_blue),
|
||||
mouse_world_pos, player=False)
|
||||
|
||||
if DisplayOptions.path_debug.tarcap:
|
||||
self.draw_tarcap_plan(self.scene(), mouse_world_pos,
|
||||
player=debug_blue)
|
||||
|
||||
def sceneMousePressEvent(self, event: QGraphicsSceneMouseEvent):
|
||||
if self.state == QLiberationMapState.MOVING_UNIT:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user