mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +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 typing import Optional
|
||||||
|
|
||||||
from dcs import Point
|
from dcs import Point
|
||||||
@ -15,7 +17,7 @@ class Helipad(PointWithHeading):
|
|||||||
self.static_unit: Optional[StaticGroup] = None
|
self.static_unit: Optional[StaticGroup] = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_point(point: Point, heading: Heading) -> "Helipad":
|
def from_point(point: Point, heading: Heading) -> Helipad:
|
||||||
h = Helipad()
|
h = Helipad()
|
||||||
h.x = point.x
|
h.x = point.x
|
||||||
h.y = point.y
|
h.y = point.y
|
||||||
|
|||||||
@ -271,7 +271,6 @@ class MizCampaignLoader:
|
|||||||
def helipads(self) -> Iterator[StaticGroup]:
|
def helipads(self) -> Iterator[StaticGroup]:
|
||||||
for group in self.blue.static_group:
|
for group in self.blue.static_group:
|
||||||
if group.units[0].type == self.FARP_HELIPAD:
|
if group.units[0].type == self.FARP_HELIPAD:
|
||||||
print("helooooo")
|
|
||||||
yield group
|
yield group
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@ -405,7 +405,7 @@ class ControlPoint(MissionTarget, ABC):
|
|||||||
"""
|
"""
|
||||||
Returns true if cp has a free helipad
|
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]:
|
def get_free_helipad(self) -> Optional[Helipad]:
|
||||||
"""
|
"""
|
||||||
@ -1187,8 +1187,6 @@ class Fob(ControlPoint):
|
|||||||
return len(self.helipads)
|
return len(self.helipads)
|
||||||
|
|
||||||
def can_operate(self, aircraft: AircraftType) -> bool:
|
def can_operate(self, aircraft: AircraftType) -> bool:
|
||||||
print(aircraft)
|
|
||||||
print(aircraft.helicopter)
|
|
||||||
if aircraft.helicopter:
|
if aircraft.helicopter:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -749,7 +749,6 @@ class AircraftConflictGenerator:
|
|||||||
group.points[0].type = "TakeOffGroundHot"
|
group.points[0].type = "TakeOffGroundHot"
|
||||||
|
|
||||||
helipad.occupied = True
|
helipad.occupied = True
|
||||||
group_generated = True
|
|
||||||
|
|
||||||
for i in range(flight.count - 1):
|
for i in range(flight.count - 1):
|
||||||
helipad = cp.get_free_helipad()
|
helipad = cp.get_free_helipad()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user