2015-03-20 03:53:58 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-03-20 03:53:58 +00:00
|
|
|
* Mount unit actions inside passenger submenu
|
|
|
|
*
|
2015-05-09 02:47:15 +00:00
|
|
|
* Arguments:
|
2015-03-20 03:53:58 +00:00
|
|
|
* 0: Vehicle <OBJECT>
|
|
|
|
* 1: Player <OBJECT>
|
|
|
|
* 3: Parameters <ARRAY>
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Children actions <ARRAY>
|
|
|
|
*
|
2015-05-09 02:47:15 +00:00
|
|
|
* Example:
|
2015-05-14 17:53:18 +00:00
|
|
|
* array = [target, player, [params]] call ace_interaction_fnc_addPassengerAction
|
2015-05-09 02:47:15 +00:00
|
|
|
*
|
2015-03-20 03:53:58 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
|
2015-05-09 20:14:00 +00:00
|
|
|
EXPLODE_1_PVT(_parameters,_unit);
|
2015-03-20 03:53:58 +00:00
|
|
|
|
2015-05-09 20:14:00 +00:00
|
|
|
private ["_varName", "_actionTrees", "_actions"];
|
2015-03-20 03:53:58 +00:00
|
|
|
|
|
|
|
_varName = format [QEGVAR(interact_menu,Act_%1), typeOf _unit];
|
|
|
|
_actionTrees = missionNamespace getVariable [_varName, []];
|
|
|
|
|
|
|
|
_actions = [];
|
|
|
|
// Mount unit MainActions menu
|
2015-04-20 21:24:12 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
EXPLODE_2_PVT(_x,_actionData,_children);
|
|
|
|
_actions pushBack [_actionData, _children, _unit];
|
|
|
|
} forEach ((_actionTrees select 0) select 1);
|
2015-03-20 03:53:58 +00:00
|
|
|
|
|
|
|
_actions
|