diff --git a/game/dcs/aircrafttype.py b/game/dcs/aircrafttype.py index 1ed162b0..7c884220 100644 --- a/game/dcs/aircrafttype.py +++ b/game/dcs/aircrafttype.py @@ -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) diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index 40496133..d4ceb7d1 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -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: diff --git a/gen/groundobjectsgen.py b/gen/groundobjectsgen.py index 319a368a..86c41ea0 100644 --- a/gen/groundobjectsgen.py +++ b/gen/groundobjectsgen.py @@ -614,7 +614,7 @@ class HelipadGenerator: self.m.static_group( country=country, name=(name + "_ammo"), - _type=Fortification.FARP_Ammo_Storage, + _type=Fortification.FARP_Ammo_Dump_Coating, position=pad.position.point_from_heading( helipad.heading, 35 ).point_from_heading(helipad.heading + 90, 10), diff --git a/qt_ui/windows/basemenu/airfield/QAircraftRecruitmentMenu.py b/qt_ui/windows/basemenu/airfield/QAircraftRecruitmentMenu.py index c5edcdbc..2df51537 100644 --- a/qt_ui/windows/basemenu/airfield/QAircraftRecruitmentMenu.py +++ b/qt_ui/windows/basemenu/airfield/QAircraftRecruitmentMenu.py @@ -52,7 +52,7 @@ class QAircraftRecruitmentMenu(QFrame, QRecruitBehaviour): continue if ( self.cp.cptype in [ControlPointType.FOB, ControlPointType.FARP] - and unit_type not in helicopter_map.values() + and not unit_type.helicopter ): continue unit_types.add(unit_type)