mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Handle edge case where aircraft have built in TPGs
This commit is contained in:
parent
0ff60283c2
commit
f965c9ffa7
@ -92,6 +92,9 @@ class Loadout:
|
|||||||
if self.has_weapon_of_type(WeaponType.TGP):
|
if self.has_weapon_of_type(WeaponType.TGP):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if unit_type.has_built_in_target_pod:
|
||||||
|
return
|
||||||
|
|
||||||
new_pylons = dict(self.pylons)
|
new_pylons = dict(self.pylons)
|
||||||
for pylon_number, weapon in self.pylons.items():
|
for pylon_number, weapon in self.pylons.items():
|
||||||
if weapon is not None and weapon.weapon_group.type is WeaponType.LGB:
|
if weapon is not None and weapon.weapon_group.type is WeaponType.LGB:
|
||||||
|
|||||||
@ -192,6 +192,11 @@ class AircraftType(UnitType[Type[FlyingType]]):
|
|||||||
# will be set to true for helos by default
|
# will be set to true for helos by default
|
||||||
can_carry_crates: bool
|
can_carry_crates: bool
|
||||||
|
|
||||||
|
# Set to True when aircraft mounts a targeting pod by default i.e. the pod does
|
||||||
|
# not take up a weapons station. If True, do not replace LGBs with dumb bombs
|
||||||
|
# when no TGP is mounted on any station.
|
||||||
|
has_built_in_target_pod: bool
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def flyable(self) -> bool:
|
def flyable(self) -> bool:
|
||||||
return self.dcs_unit_type.flyable
|
return self.dcs_unit_type.flyable
|
||||||
@ -441,4 +446,5 @@ class AircraftType(UnitType[Type[FlyingType]]):
|
|||||||
unit_class=unit_class,
|
unit_class=unit_class,
|
||||||
cabin_size=data.get("cabin_size", 10 if aircraft.helicopter else 0),
|
cabin_size=data.get("cabin_size", 10 if aircraft.helicopter else 0),
|
||||||
can_carry_crates=data.get("can_carry_crates", aircraft.helicopter),
|
can_carry_crates=data.get("can_carry_crates", aircraft.helicopter),
|
||||||
|
has_built_in_target_pod=data.get("has_built_in_target_pod", False),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -17,3 +17,4 @@ price: 35
|
|||||||
role: Stealth Attack
|
role: Stealth Attack
|
||||||
variants:
|
variants:
|
||||||
F-117A Nighthawk: {}
|
F-117A Nighthawk: {}
|
||||||
|
has_built_in_target_pod: true
|
||||||
|
|||||||
@ -10,3 +10,4 @@ role: Multirole Strike Fighter
|
|||||||
max_range: 300
|
max_range: 300
|
||||||
variants:
|
variants:
|
||||||
F-15E Strike Eagle: {}
|
F-15E Strike Eagle: {}
|
||||||
|
has_built_in_target_pod: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user