mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add special fuel case for C101 #492
This commit is contained in:
parent
473cda971a
commit
6296896471
@ -20,12 +20,15 @@ from dcs.planes import (
|
|||||||
B_17G,
|
B_17G,
|
||||||
B_52H,
|
B_52H,
|
||||||
Bf_109K_4,
|
Bf_109K_4,
|
||||||
|
C_101EB,
|
||||||
|
C_101CC,
|
||||||
FW_190A8,
|
FW_190A8,
|
||||||
FW_190D9,
|
FW_190D9,
|
||||||
F_14B,
|
F_14B,
|
||||||
I_16,
|
I_16,
|
||||||
JF_17,
|
JF_17,
|
||||||
Ju_88A4,
|
Ju_88A4,
|
||||||
|
PlaneType,
|
||||||
P_47D_30,
|
P_47D_30,
|
||||||
P_47D_30bl1,
|
P_47D_30bl1,
|
||||||
P_47D_40,
|
P_47D_40,
|
||||||
@ -791,14 +794,9 @@ class AircraftConflictGenerator:
|
|||||||
joker_fuel=flight.flight_plan.joker_fuel
|
joker_fuel=flight.flight_plan.joker_fuel
|
||||||
))
|
))
|
||||||
|
|
||||||
# Special case so Su 33 carrier take off
|
# Special case so Su 33 and C101 can take off
|
||||||
if unit_type is Su_33:
|
if unit_type in [Su_33, C_101EB, C_101CC]:
|
||||||
if flight.flight_type is not CAP:
|
self.set_reduced_fuel(flight, group, unit_type)
|
||||||
for unit in group.units:
|
|
||||||
unit.fuel = Su_33.fuel_max / 2.2
|
|
||||||
else:
|
|
||||||
for unit in group.units:
|
|
||||||
unit.fuel = Su_33.fuel_max * 0.8
|
|
||||||
|
|
||||||
def _generate_at_airport(self, name: str, side: Country,
|
def _generate_at_airport(self, name: str, side: Country,
|
||||||
unit_type: Type[FlyingType], count: int,
|
unit_type: Type[FlyingType], count: int,
|
||||||
@ -1078,6 +1076,20 @@ class AircraftConflictGenerator:
|
|||||||
|
|
||||||
return group
|
return group
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def set_reduced_fuel(flight: Flight, group: FlyingGroup, unit_type: Type[PlaneType]) -> None:
|
||||||
|
if unit_type is Su_33:
|
||||||
|
for unit in group.units:
|
||||||
|
if flight.flight_type is not CAP:
|
||||||
|
unit.fuel = Su_33.fuel_max / 2.2
|
||||||
|
else:
|
||||||
|
unit.fuel = Su_33.fuel_max * 0.8
|
||||||
|
elif unit_type in [C_101EB, C_101CC]:
|
||||||
|
for unit in group.units:
|
||||||
|
unit.fuel = unit_type.fuel_max * 0.5
|
||||||
|
else:
|
||||||
|
raise RuntimeError(f"No reduced fuel case for type {unit_type}")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def configure_behavior(
|
def configure_behavior(
|
||||||
group: FlyingGroup,
|
group: FlyingGroup,
|
||||||
|
|||||||
@ -193,12 +193,9 @@ class TriggersGenerator:
|
|||||||
self._set_allegiances(player_coalition, enemy_coalition)
|
self._set_allegiances(player_coalition, enemy_coalition)
|
||||||
self._gen_markers()
|
self._gen_markers()
|
||||||
self._generate_capture_triggers(player_coalition, enemy_coalition)
|
self._generate_capture_triggers(player_coalition, enemy_coalition)
|
||||||
print("Test")
|
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_capture_zone_flag(cls):
|
def get_capture_zone_flag(cls):
|
||||||
flag = cls.capture_zone_flag
|
flag = cls.capture_zone_flag
|
||||||
cls.capture_zone_flag += 1
|
cls.capture_zone_flag += 1
|
||||||
return flag
|
return flag
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user