mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Helipad : fixed errors after merge of develop features.
This commit is contained in:
@@ -116,6 +116,10 @@ class AircraftType(UnitType[FlyingType]):
|
||||
def flyable(self) -> bool:
|
||||
return self.dcs_unit_type.flyable
|
||||
|
||||
@property
|
||||
def helicopter(self) -> bool:
|
||||
return self.dcs_unit_type.helicopter
|
||||
|
||||
@cached_property
|
||||
def max_speed(self) -> Speed:
|
||||
return kph(self.dcs_unit_type.max_speed)
|
||||
|
||||
@@ -31,6 +31,7 @@ from dcs.ships import (
|
||||
)
|
||||
from dcs.terrain.terrain import Airport, ParkingSlot
|
||||
from dcs.unit import Unit
|
||||
from dcs.unittype import FlyingType
|
||||
|
||||
from game import db
|
||||
from game.point_with_heading import PointWithHeading
|
||||
@@ -44,10 +45,9 @@ from .theatergroundobject import (
|
||||
GenericCarrierGroundObject,
|
||||
TheaterGroundObject,
|
||||
)
|
||||
from ..db import PRICES
|
||||
from ..helipad import Helipad
|
||||
from ..dcs.aircrafttype import AircraftType
|
||||
from ..dcs.groundunittype import GroundUnitType
|
||||
from ..helipad import Helipad
|
||||
from ..utils import nautical_miles
|
||||
from ..weather import Conditions
|
||||
|
||||
@@ -1149,7 +1149,9 @@ class Fob(ControlPoint):
|
||||
def total_aircraft_parking(self) -> int:
|
||||
return len(self.helipads)
|
||||
|
||||
def can_operate(self, aircraft: FlyingType) -> bool:
|
||||
def can_operate(self, aircraft: AircraftType) -> bool:
|
||||
print(aircraft)
|
||||
print(aircraft.helicopter)
|
||||
if aircraft.helicopter:
|
||||
return True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user