mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fullCrew new parameter to improve FUNC(getTurretX)
This commit is contained in:
parent
f67b3561e8
commit
aee4d23bdb
@ -14,19 +14,4 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (getNumber (_config >> "primaryObserver") == 1) exitWith {
|
||||
_turret = _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "commander", true] apply {_x select 3} param [0, []] // return
|
||||
|
@ -14,19 +14,6 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (getNumber (_config >> "isCopilot") == 1 && {getNumber (_config >> "primaryGunner") != 1} && {getNumber (_config >> "primaryObserver") != 1}) exitWith {
|
||||
_turret = _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "turret", true] apply {_x select 3} select {
|
||||
getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") == 1
|
||||
} param [0, []] // return
|
||||
|
@ -14,19 +14,4 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (getNumber (_config >> "primaryGunner") == 1) exitWith {
|
||||
_turret = _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "gunner", true] apply {_x select 3} param [0, []] // return
|
||||
|
@ -8,12 +8,14 @@
|
||||
* Return Value:
|
||||
* Turret Indecies <ARRAY>
|
||||
*
|
||||
* Public: Yes
|
||||
* Public: No
|
||||
*
|
||||
* Note: It's advised to use allTurrets [_vehicle, true] instead whenever possible
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_getTurrets","3.7.0","allTurrets [_vehicle, true]");
|
||||
|
||||
params ["_type"];
|
||||
|
||||
private _varName = format [QGVAR(CachedTurrets_%1), _type];
|
||||
|
@ -14,19 +14,4 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (getNumber (_config >> "isPersonTurret") == 1) then {
|
||||
_turret pushBack _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "turret", true] select {_x select 4} apply {_x select 3} // return
|
||||
|
@ -14,24 +14,6 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
private _turrets = allTurrets [_vehicle, true];
|
||||
|
||||
private _turret = [];
|
||||
|
||||
{
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if (
|
||||
getNumber (_config >> "isCopilot") != 1
|
||||
&& {getNumber (_config >> "primaryGunner") != 1}
|
||||
&& {getNumber (_config >> "primaryObserver") != 1}
|
||||
&& {getNumber (_config >> "isPersonTurret") != 1}
|
||||
) then {
|
||||
_turret pushBack _x;
|
||||
};
|
||||
false
|
||||
} count _turrets;
|
||||
|
||||
_turret
|
||||
fullCrew [_vehicle, "turret", true] select {!(_x select 4)} apply {_x select 3} select {
|
||||
getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") != 1
|
||||
} // return
|
||||
|
Loading…
Reference in New Issue
Block a user