Files
MissionTemplate/framework/vehicleFlags/functions/fn_getActionsFlagCategories.sqf
2024-06-16 15:45:12 -05:00

28 lines
753 B
Plaintext

/*
Used to generate flag category and nested flag child options for the ACE3 interaction menu.
Parameters:
0: STRING - Parent action ID
1: ARRAY - Flag category configs
*/
params ["_rootActionID", "_flagCategoryCfgs"];
private _allCategoryActions = [];
{
_flagCategoryActions = [];
if (configName _x == "SimpleShapes") then {
{
_flagCategoryActions pushBack ([_rootActionID, _x] call FUNC(compileFlagCategoryAction));
} forEach (_x call BIS_fnc_returnChildren);
} else {
_flagCategoryActions pushBack (_x call FUNC(compileFlagCategoryAction));
};
// add category to all category actions array
{
_allCategoryActions pushBack [_x, [], _target];
} forEach _flagCategoryActions;
} forEach _flagCategoryCfgs;
_allCategoryActions;