Plan AEW&C in safer locations.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1119
This commit is contained in:
Dan Albert
2021-05-31 14:57:25 -07:00
parent e94ebd6ed2
commit 2d0929cd69
2 changed files with 24 additions and 32 deletions

View File

@@ -40,6 +40,10 @@ class ThreatZones:
)
return DcsPoint(boundary.x, boundary.y)
def distance_to_threat(self, point: DcsPoint) -> Distance:
boundary = self.closest_boundary(point)
return meters(boundary.distance_to_point(point))
@singledispatchmethod
def threatened(self, position) -> bool:
raise NotImplementedError