mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Applied minor requested changes
This commit is contained in:
parent
ce1c416b20
commit
9ea1edf9db
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user