Inject mod plane weapons into pydcs.

Adds a simple injector that iterates over attrs of an input class and
injects things that look like custom weapons into pydcs's weapons
classes.

Also updated all current mod aircraft configs to perform the injection.
This commit is contained in:
bgreman
2021-05-26 15:49:49 -04:00
committed by GitHub
parent 372bf9d97f
commit c163e2c981
6 changed files with 43 additions and 5 deletions

View File

@@ -4,6 +4,8 @@ from dcs import task
from dcs.planes import PlaneType
from dcs.weapons_data import Weapons
from pydcs_extensions.weapon_injector import inject_weapons
class WeaponsA4EC:
AN_M57__2__TER_ = {
@@ -432,6 +434,9 @@ class WeaponsA4EC:
}
inject_weapons(WeaponsA4EC)
class A_4E_C(PlaneType):
id = "A-4E-C"
flyable = True