ACE3/addons/missileguidance/dev/getAmmoProperties.sqf
2021-10-15 22:34:45 -06:00

28 lines
1.1 KiB
Plaintext

#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]