mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
This is as much as we can do until pydcs actually adds the py.typed file. Once that's added there are a few ugly monkey patching corners that will just need `# type: ignore` for now, but we can't pre-add those since we have mypy warning us about superfluous ignore comments.
18 lines
408 B
Python
18 lines
408 B
Python
from __future__ import annotations
|
|
|
|
from dcs import Point
|
|
|
|
|
|
class PointWithHeading(Point):
|
|
def __init__(self) -> None:
|
|
super(PointWithHeading, self).__init__(0, 0)
|
|
self.heading = 0
|
|
|
|
@staticmethod
|
|
def from_point(point: Point, heading: int) -> PointWithHeading:
|
|
p = PointWithHeading()
|
|
p.x = point.x
|
|
p.y = point.y
|
|
p.heading = heading
|
|
return p
|