mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
8f46ffd8d5
count -> forEach Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
35 lines
678 B
Plaintext
35 lines
678 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: bux578
|
|
* Returns all turret indecies of door gunners.
|
|
*
|
|
* Arguments:
|
|
* 0: Vehicle <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* All turret indecies of the Vehicle <ARRAY>
|
|
*
|
|
* Example:
|
|
* [car] call ace_common_fnc_getDoorTurrets
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params ["_vehicle"];
|
|
|
|
private _turrets = allTurrets [_vehicle, true];
|
|
|
|
private _doorTurrets = [];
|
|
|
|
{
|
|
private _config = configOf _vehicle;
|
|
|
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
|
|
|
if (((getNumber (_config >> "isCopilot")) == 0) && {count getArray (_config >> "weapons") > 0}) then {
|
|
_doorTurrets pushBack _x;
|
|
};
|
|
} forEach _turrets;
|
|
|
|
_doorTurrets
|