Applied minor requested changes

This commit is contained in:
Khopa 2021-08-06 23:55:58 +02:00
parent ce1c416b20
commit 9ea1edf9db
4 changed files with 4 additions and 6 deletions

View File

@ -1,3 +1,5 @@
from __future__ import annotations
from typing import Optional
from dcs import Point
@ -15,7 +17,7 @@ class Helipad(PointWithHeading):
self.static_unit: Optional[StaticGroup] = None
@staticmethod
def from_point(point: Point, heading: Heading) -> "Helipad":
def from_point(point: Point, heading: Heading) -> Helipad:
h = Helipad()
h.x = point.x
h.y = point.y

View File

@ -271,7 +271,6 @@ class MizCampaignLoader:
def helipads(self) -> Iterator[StaticGroup]:
for group in self.blue.static_group:
if group.units[0].type == self.FARP_HELIPAD:
print("helooooo")
yield group
@property

View File

@ -405,7 +405,7 @@ class ControlPoint(MissionTarget, ABC):
"""
Returns true if cp has a free helipad
"""
return False in [h.occupied for h in self.helipads]
return not all(h.occupied for h in self.helipads)
def get_free_helipad(self) -> Optional[Helipad]:
"""
@ -1187,8 +1187,6 @@ class Fob(ControlPoint):
return len(self.helipads)
def can_operate(self, aircraft: AircraftType) -> bool:
print(aircraft)
print(aircraft.helicopter)
if aircraft.helicopter:
return True
else:

View File

@ -749,7 +749,6 @@ class AircraftConflictGenerator:
group.points[0].type = "TakeOffGroundHot"
helipad.occupied = True
group_generated = True
for i in range(flight.count - 1):
helipad = cp.get_free_helipad()