ACE3/addons/interaction/functions/fnc_addPassengerActions.sqf
johnb432 4cf61a026b
Interact Menu - Use hashmaps for interactions (#9920)
* Use hashmaps for interactions

* Update addons/interact_menu/functions/fnc_splitPath.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Account for case sensitivity

* Update addons/interact_menu/functions/fnc_compileMenu.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-05-21 20:18:32 -05:00

35 lines
731 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: esteldunedain
* Mount unit actions inside passenger submenu.
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
* 3: Parameters <ARRAY>
*
* Return Value:
* Children actions <ARRAY>
*
* Example:
* array = [target, player, [params]] call ace_interaction_fnc_addPassengerActions
*
* Public: No
*/
params ["", "", "_parameters"];
_parameters params ["_unit"];
private _actionTrees = EGVAR(interact_menu,ActNamespace) getOrDefault [typeOf _unit, []];
private _actions = [];
// Mount unit MainActions menu
{
_x params ["_actionData", "_children"];
_actions pushBack [_actionData, _children, _unit];
} forEach (_actionTrees select 0 select 1);
_actions