ACE3/addons/csw/functions/fnc_assemble_canPickupWeapon.sqf
johnb432 56eae4060c
CSW - Improve function headers & comments (#10149)
Code formatting changes from 9234
2024-07-27 19:42:31 +02:00

24 lines
649 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: tcvm
* If the CSW is mounted or in use this will not allow you to dismount the weapon.
*
* Arguments:
* 0: CSW <OBJECT>
*
* Return Value:
* Can dismount weapon <BOOL>
*
* Example:
* cursorObject call ace_csw_fnc_assemble_canPickupWeapon
*
* Public: No
*/
params ["_vehicle"];
// Assembly mode: [0=disabled, 1=enabled, 2=enabled&unload, 3=default]
private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select (_vehicle getVariable [QGVAR(assemblyMode), 3]);
_assemblyMode && {alive _vehicle} && {((crew _vehicle) findIf {alive _x && {!unitIsUAV _x}}) == -1} // return