add dev function to get ammo which has MG class data

This commit is contained in:
Brandon Danyluk 2021-10-15 22:34:45 -06:00
parent 10c2019818
commit 34c7b57532
2 changed files with 28 additions and 1 deletions

View File

@ -2,6 +2,6 @@ class EGVAR(missileguidance,AttackProfiles) {
class maverick {
name = "LOAL-DIR";
nameLocked = "LOBL-DIR";
functionName = QEFUNC(missileguidance,attackProfile_DIR);
functionName = QEFUNC(missileguidance,attackProfile_LIN);
};
};

View File

@ -0,0 +1,27 @@
#include "\z\ace\addons\missileguidance\script_component.hpp"
private _configs = configProperties [configFile >> "CfgAmmo", QUOTE((isClass _x) && { isClass (_x >> QUOTE(QUOTE(ADDON)))} )];
private _seekerTypes = createHashMap;
private _navigationTypes = createHashMap;
private _attackProfiles = createHashMap;
{
private _seekerType = getText (_x >> QUOTE(ADDON) >> "defaultSeekerType");
private _navigationType = getText (_x >> QUOTE(ADDON) >> "defaultNavigationType");
private _attackProfile = getText (_x >> QUOTE(ADDON) >> "defaultAttackProfile");
private _seekers = _seekerTypes getOrDefault [_seekerType, []];
private _navigations = _navigationTypes getOrDefault [_navigationType, []];
private _attacks = _attackProfiles getOrDefault [_attackProfile, []];
_seekers pushBack configName _x;
_navigations pushBack configName _x;
_attacks pushBack configName _x;
_seekerTypes set [_seekerType, _seekers];
_navigationTypes set [_navigationType, _navigations];
_attackProfiles set [_attackProfile, _attacks];
} forEach _configs;
[_seekerTypes, _navigationTypes, _attackProfiles]