2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2016-02-20 23:19:56 +00:00
|
|
|
/*
|
|
|
|
* Author: Commy2 and esteldunedain
|
|
|
|
* Return true if the unit can unjam it's current weapon
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Player <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* Bool <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [bob] call ace_overheating_fnc_canUnjam
|
2016-02-20 23:19:56 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_unit"];
|
|
|
|
TRACE_1("_unit",_unit);
|
|
|
|
|
|
|
|
private _jammedWeapons = _unit getVariable [QGVAR(jammedWeapons), []];
|
|
|
|
if !(currentWeapon _unit in _jammedWeapons) exitWith {
|
|
|
|
false
|
|
|
|
};
|
2016-02-22 21:03:40 +00:00
|
|
|
if !([_unit] call CBA_fnc_canUseWeapon) exitWith {
|
2016-02-20 23:19:56 +00:00
|
|
|
false
|
|
|
|
};
|
|
|
|
true
|