2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-03-20 03:53:58 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-09-28 12:35:05 +00:00
|
|
|
* Mount unit actions inside passenger submenu.
|
2015-03-20 03:53:58 +00:00
|
|
|
*
|
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>
|
|
|
|
*
|
2015-09-28 12:35:05 +00:00
|
|
|
* Return Value:
|
2015-03-20 03:53:58 +00:00
|
|
|
* Children actions <ARRAY>
|
|
|
|
*
|
2015-05-09 02:47:15 +00:00
|
|
|
* Example:
|
2020-04-25 06:41:45 +00:00
|
|
|
* array = [target, player, [params]] call ace_interaction_fnc_addPassengerActions
|
2015-05-09 02:47:15 +00:00
|
|
|
*
|
2015-03-20 03:53:58 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-09-28 12:35:05 +00:00
|
|
|
params ["", "", "_parameters"];
|
|
|
|
_parameters params ["_unit"];
|
2015-03-20 03:53:58 +00:00
|
|
|
|
2024-05-22 01:18:32 +00:00
|
|
|
private _actionTrees = EGVAR(interact_menu,ActNamespace) getOrDefault [typeOf _unit, []];
|
2015-03-20 03:53:58 +00:00
|
|
|
|
2016-02-12 21:48:06 +00:00
|
|
|
private _actions = [];
|
2015-04-20 21:24:12 +00:00
|
|
|
|
2015-09-28 12:35:05 +00:00
|
|
|
// Mount unit MainActions menu
|
2015-04-20 21:24:12 +00:00
|
|
|
{
|
2015-09-28 12:35:05 +00:00
|
|
|
_x params ["_actionData", "_children"];
|
|
|
|
|
|
|
|
_actions pushBack [_actionData, _children, _unit];
|
2024-04-04 11:15:26 +00:00
|
|
|
} forEach (_actionTrees select 0 select 1);
|
2015-03-20 03:53:58 +00:00
|
|
|
|
|
|
|
_actions
|