ACE3/addons/interaction/functions/fnc_addPassengerActions.sqf

40 lines
820 B
Plaintext
Raw Normal View History

/*
2015-03-24 04:18:00 +00:00
* Author: esteldunedain
2015-09-28 12:35:05 +00:00
* Mount unit actions inside passenger submenu.
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
* 3: Parameters <ARRAY>
*
2015-09-28 12:35:05 +00:00
* Return Value:
* Children actions <ARRAY>
*
* Example:
* array = [target, player, [params]] call ace_interaction_fnc_addPassengerAction
*
* Public: No
*/
#include "script_component.hpp"
2015-09-28 12:35:05 +00:00
params ["", "", "_parameters"];
_parameters params ["_unit"];
2016-03-06 06:55:34 +00:00
private _namespace = EGVAR(interact_menu,ActNamespace);
private _actionTrees = _namespace getVariable typeOf _unit;
if (isNil "_actionTrees") then {
_actionTrees = [];
};
private _actions = [];
2015-09-28 12:35:05 +00:00
// Mount unit MainActions menu
{
2015-09-28 12:35:05 +00:00
_x params ["_actionData", "_children"];
_actions pushBack [_actionData, _children, _unit];
false
} count (_actionTrees select 0 select 1);
_actions