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
|
|
|
* Create one action per passenger.
|
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 16:06:25 +00:00
|
|
|
* Return Value:
|
2015-03-20 03:53:58 +00:00
|
|
|
* Children actions <ARRAY>
|
|
|
|
*
|
2015-05-09 02:47:15 +00:00
|
|
|
* Example:
|
2015-05-14 18:00:56 +00:00
|
|
|
* [target, player, [params]] call ace_interaction_fnc_addPassengersActions
|
2015-05-09 02:47:15 +00:00
|
|
|
*
|
2015-03-20 03:53:58 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-28 12:35:05 +00:00
|
|
|
params ["_vehicle", "_player"];
|
2015-03-20 03:53:58 +00:00
|
|
|
|
2015-09-28 12:35:05 +00:00
|
|
|
private "_actions";
|
2015-03-20 03:53:58 +00:00
|
|
|
_actions = [];
|
|
|
|
|
|
|
|
{
|
2015-06-12 18:32:10 +00:00
|
|
|
private ["_unit", "_icon"];
|
2015-09-28 12:35:05 +00:00
|
|
|
|
2015-03-20 03:53:58 +00:00
|
|
|
_unit = _x;
|
2015-09-28 12:35:05 +00:00
|
|
|
|
|
|
|
if (_unit != _player && {getText (configFile >> "CfgVehicles" >> typeOf _unit >> "simulation") != "UAVPilot"}) then {
|
|
|
|
_icon = [
|
|
|
|
"",
|
|
|
|
"A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_driver_ca.paa",
|
|
|
|
"A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_gunner_ca.paa",
|
|
|
|
"A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_commander_ca.paa"
|
|
|
|
] select (([driver _vehicle, gunner _vehicle, commander _vehicle] find _unit) + 1);
|
|
|
|
|
2015-06-13 05:12:13 +00:00
|
|
|
if (_unit getVariable [QEGVAR(captives,isHandcuffed), false]) then {
|
|
|
|
_icon = QUOTE(PATHTOEF(captives,UI\handcuff_ca.paa));
|
|
|
|
};
|
2015-09-28 12:35:05 +00:00
|
|
|
|
|
|
|
_actions pushBack [
|
2015-03-20 03:53:58 +00:00
|
|
|
[
|
2015-09-28 12:35:05 +00:00
|
|
|
format ["%1", _unit],
|
|
|
|
[_unit, true] call EFUNC(common,getName),
|
|
|
|
_icon,
|
|
|
|
{},
|
|
|
|
{true},
|
|
|
|
{_this call FUNC(addPassengerActions)},
|
|
|
|
[_unit]
|
|
|
|
] call EFUNC(interact_menu,createAction),
|
|
|
|
[],
|
|
|
|
_unit
|
|
|
|
];
|
2015-03-20 03:53:58 +00:00
|
|
|
};
|
2015-09-28 12:35:05 +00:00
|
|
|
false
|
|
|
|
} count crew _vehicle;
|
2015-03-20 03:53:58 +00:00
|
|
|
|
2015-05-09 02:47:15 +00:00
|
|
|
_actions
|