Merge pull request #128 from DanAlbert/coalesce-target-points

Improve target waypoint behavior in the kneeboard.
This commit is contained in:
C. Perreau
2020-09-11 20:51:52 +02:00
committed by GitHub
4 changed files with 208 additions and 64 deletions

View File

@@ -62,7 +62,9 @@ class PredefinedWaypointCategory(Enum):
class FlightWaypoint:
def __init__(self, x: float, y: float, alt=0):
def __init__(self, waypoint_type: FlightWaypointType, x: float, y: float,
alt: int = 0) -> None:
self.waypoint_type = waypoint_type
self.x = x
self.y = y
self.alt = alt
@@ -73,8 +75,7 @@ class FlightWaypoint:
self.targetGroup = None
self.obj_name = ""
self.pretty_name = ""
self.waypoint_type = FlightWaypointType.TAKEOFF # type: FlightWaypointType
self.category = PredefinedWaypointCategory.NOT_PREDEFINED# type: PredefinedWaypointCategory
self.category: PredefinedWaypointCategory = PredefinedWaypointCategory.NOT_PREDEFINED
self.only_for_player = False
self.data = None