mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
F-16I mod v2.2 support (by IDF Mods Project) (#9)
This commit is contained in:
4752
pydcs_extensions/f16i_idf/f16i_idf.py
Normal file
4752
pydcs_extensions/f16i_idf/f16i_idf.py
Normal file
File diff suppressed because it is too large
Load Diff
17
pydcs_extensions/pylon_injector.py
Normal file
17
pydcs_extensions/pylon_injector.py
Normal 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)
|
||||
Reference in New Issue
Block a user