mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fixed faction loader so it works with known modded units
This commit is contained in:
parent
aa7eacc043
commit
bc1e793ce6
@ -193,6 +193,10 @@ def unit_loader(unit: str, class_repository:[]) -> Optional[PlaneType]:
|
||||
for mother_class in class_repository:
|
||||
if getattr(mother_class, unit, None) is not None:
|
||||
return getattr(mother_class, unit)
|
||||
if type(mother_class) is list:
|
||||
for m in mother_class:
|
||||
if m.__name__ == unit:
|
||||
return m
|
||||
logging.info("FACTION ERROR : Unable to find " + unit + " in pydcs")
|
||||
print("FACTION ERROR : Unable to find " + unit + " in pydcs")
|
||||
return None
|
||||
|
||||
78
resources/factions/russia_2020.json
Normal file
78
resources/factions/russia_2020.json
Normal file
@ -0,0 +1,78 @@
|
||||
{
|
||||
"country": "Russia",
|
||||
"name": "Russia 2020 (Modded)",
|
||||
"aircrafts": [
|
||||
"MiG_29S",
|
||||
"MiG_31",
|
||||
"Su_24M",
|
||||
"Su_25",
|
||||
"Su_25T",
|
||||
"Su_27",
|
||||
"Su_30",
|
||||
"Su_33",
|
||||
"Su_34",
|
||||
"Su_57",
|
||||
"L_39ZA",
|
||||
"Mi_8MT",
|
||||
"Mi_24V",
|
||||
"Mi_28N",
|
||||
"Ka_50"
|
||||
],
|
||||
"awacs": [
|
||||
"A_50"
|
||||
],
|
||||
"tankers": [
|
||||
"IL_78M"
|
||||
],
|
||||
"frontline_units": [
|
||||
"IFV_BMP_2",
|
||||
"IFV_BMP_3",
|
||||
"MBT_T_90",
|
||||
"MBT_T_80U",
|
||||
"MBT_T_72B"
|
||||
],
|
||||
"artillery_units": [
|
||||
"MLRS_9K57_Uragan_BM_27",
|
||||
"SPH_2S19_Msta"
|
||||
],
|
||||
"logistics_units": [
|
||||
"Transport_Ural_375",
|
||||
"Transport_UAZ_469"
|
||||
],
|
||||
"infantry_units": [
|
||||
"Paratrooper_AKS",
|
||||
"Infantry_Soldier_Rus",
|
||||
"Paratrooper_RPG_16"
|
||||
],
|
||||
"shorads": [
|
||||
"SA19Generator"
|
||||
],
|
||||
"sams": [
|
||||
"SA11Generator",
|
||||
"SA10Generator",
|
||||
"SA19Generator"
|
||||
],
|
||||
"aircraft_carrier": [
|
||||
"CV_1143_5_Admiral_Kuznetsov"
|
||||
],
|
||||
"helicopter_carrier": [
|
||||
],
|
||||
"lhanames": [
|
||||
],
|
||||
"destroyers": [
|
||||
"FF_1135M_Rezky"
|
||||
],
|
||||
"cruisers": [
|
||||
"FSG_1241_1MP_Molniya"
|
||||
],
|
||||
"requirements": {},
|
||||
"carrier_names": [
|
||||
"Admiral Kuznetov"
|
||||
],
|
||||
"navy_generators": [
|
||||
"RussianNavyGroupGenerator",
|
||||
"KiloSubGroupGenerator"
|
||||
],
|
||||
"has_jtac": true,
|
||||
"jtac_unit": "MQ_9_Reaper"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user