mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Attempt to fix index-out-of-range
Injecting pylons in the F-100 seems to go out of bounds here
This commit is contained in:
parent
2cfd56c8da
commit
64f6a10ced
@ -515,7 +515,12 @@ class AircraftType(UnitType[Type[FlyingType]]):
|
||||
for pylon_number, weapons in wpn_injection.items():
|
||||
for w in weapons:
|
||||
weapon = weapon_ids[w]
|
||||
setattr(pylons[pylon_number - 1], w, (pylon_number, weapon))
|
||||
pylon = [
|
||||
pylon
|
||||
for pylon in pylons
|
||||
if int(pylon.__name__.replace("Pylon", "")) == pylon_number
|
||||
][0]
|
||||
setattr(pylon, w, (pylon_number, weapon))
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.name)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user