ACE3/addons/overheating/functions/fnc_canUnjam.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

29 lines
536 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Commy2 and esteldunedain
* Return true if the unit can unjam it's current weapon
*
* Arguments:
* 0: Player <OBJECT>
*
* Return Value:
* Bool <BOOL>
*
* Example:
* [bob] call ace_overheating_fnc_canUnjam
*
* Public: No
*/
params ["_unit"];
TRACE_1("_unit",_unit);
private _jammedWeapons = _unit getVariable [QGVAR(jammedWeapons), []];
if !(currentWeapon _unit in _jammedWeapons) exitWith {
false
};
if !([_unit] call CBA_fnc_canUseWeapon) exitWith {
false
};
true