mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Refactor & fix code after comments
This commit is contained in:
parent
e00951e5b9
commit
1b9ac088e4
@ -1133,7 +1133,7 @@ class Fob(ControlPoint):
|
||||
self.name = name
|
||||
|
||||
def runway_is_operational(self) -> bool:
|
||||
return False
|
||||
return self.has_helipads
|
||||
|
||||
def active_runway(
|
||||
self, conditions: Conditions, dynamic_runways: Dict[str, RunwayData]
|
||||
|
||||
@ -1197,7 +1197,7 @@ class AircraftConflictGenerator:
|
||||
|
||||
# If the flight is an helicopter flight, then prioritize dedicated helipads
|
||||
group = None
|
||||
if flight.unit_type in helicopters.helicopter_map.values():
|
||||
if flight.unit_type.helicopter:
|
||||
helipad = cp.get_free_helipad()
|
||||
if helipad is not None:
|
||||
group = self._generate_at_group(
|
||||
|
||||
@ -25,11 +25,7 @@ class ClosestAirfields:
|
||||
|
||||
@property
|
||||
def operational_airfields(self) -> Iterator[ControlPoint]:
|
||||
return (
|
||||
c
|
||||
for c in self.closest_airfields
|
||||
if c.runway_is_operational() or c.has_helipads
|
||||
)
|
||||
return (c for c in self.closest_airfields if c.runway_is_operational())
|
||||
|
||||
def _airfields_within(
|
||||
self, distance: Distance, operational: bool
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user