Allow harriers to operate from FOBs/FARPs

Resolve #109
This commit is contained in:
Raffson
2023-05-28 21:05:17 +02:00
parent b8cb1a6273
commit 7582040d41
5 changed files with 37 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ from typing import Any, List, Optional, TYPE_CHECKING
from dcs import Point
from dcs.planes import C_101CC, C_101EB, Su_33, FA_18C_hornet
from game.dcs.aircrafttype import AircraftType
from pydcs_extensions.hercules.hercules import Hercules
from .flightroster import FlightRoster
from .flightstate import FlightState, Navigating, Uninitialized
@@ -23,7 +24,6 @@ from ..sidc import (
Status,
SymbolSet,
)
from game.dcs.aircrafttype import AircraftType
if TYPE_CHECKING:
from game.sim.gameupdateevents import GameUpdateEvents
@@ -228,6 +228,8 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
self.fuel = unit_type.fuel_max * 0.5
elif unit_type == Hercules:
self.fuel = unit_type.fuel_max * 0.75
elif self.departure.cptype.name in ["FARP", "FOB"] and not self.is_helo:
self.fuel = unit_type.fuel_max * 0.75
def __repr__(self) -> str:
return self.__str__()