-
Notifications
You must be signed in to change notification settings - Fork 750
Expand file tree
/
Copy pathgetAmmoProperties.sqf
More file actions
26 lines (20 loc) · 1.08 KB
/
getAmmoProperties.sqf
File metadata and controls
26 lines (20 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "..\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]