F-16I mod v2.2 support (by IDF Mods Project) (#9)

This commit is contained in:
MetalStormGhost
2022-10-29 18:12:50 +03:00
committed by GitHub
parent 7a5e878733
commit b64a0f17eb
49 changed files with 7769 additions and 9 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
from typing import Tuple, Any
def inject_pylon(to_pylon: Any, from_pylon: Any) -> None:
"""
Inject weapons/ordnance added by mods into the pylons of existing aircraft.
This is done to support mods such as the CJS Super Hornet, which modify aircraft
that exist in stock DCS. Ornance is injected pydcs aircraft classes via introspection
:param to_pylon: The pydcs pylon class of the target aircraft
:param from_pylon: The custom pylon class containing tuples with added weapon info
:return: None
"""
for key, value in from_pylon.__dict__.items():
if key.startswith("__"):
continue
if isinstance(value, Tuple):
setattr(to_pylon, key, value)