mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Update pydcs, adapt to new Point APIs.
This is briefly moving us over to my fork of pydcs while we wait for https://github.com/pydcs/dcs/pull/206 to be merged. The adaptation is invasive enough that I don't want it lingering for long.
This commit is contained in:
@@ -22,8 +22,7 @@ AltitudeReference = Literal["BARO", "RADIO"]
|
||||
class FlightWaypoint:
|
||||
name: str
|
||||
waypoint_type: FlightWaypointType
|
||||
x: float
|
||||
y: float
|
||||
position: Point
|
||||
alt: Distance = meters(0)
|
||||
alt_type: AltitudeReference = "BARO"
|
||||
control_point: ControlPoint | None = None
|
||||
@@ -50,8 +49,12 @@ class FlightWaypoint:
|
||||
departure_time: timedelta | None = None
|
||||
|
||||
@property
|
||||
def position(self) -> Point:
|
||||
return Point(self.x, self.y)
|
||||
def x(self) -> float:
|
||||
return self.position.x
|
||||
|
||||
@property
|
||||
def y(self) -> float:
|
||||
return self.position.y
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(id(self))
|
||||
|
||||
Reference in New Issue
Block a user