ACE3/addons/mk6mortar/functions/fnc_canUnloadMagazine.sqf
Dedmen Miller 81e02a7336 Refactor private ARRAY to private keyword (#5598)
* Everything

* Fixed missing ;

* Fix missing ; and double private

* Fixed cannot isNull on number

* Turn _temparture back to isNil

* Fix error from merge
2017-10-10 09:39:59 -05:00

29 lines
651 B
Plaintext

/*
* Author: Grey
* Checks whether magazine can be unloaded from static weapon
*
* Arguments:
* 0: static <OBJECT>
* 1: unit <OBJECT>
*
* Return Value:
* canUnloadMagazine <BOOL>
*
* Example:
* [_target,_player] call ace_mk6mortar_fnc_canUnloadMagazine
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_static","_unit"];
if !(alive _static && GVAR(useAmmoHandling) && _static getVariable [QGVAR(initialized),false]) exitWith {false};
private _canUnloadMagazine = false;
private _ammoCount = ((magazinesAllTurrets _static) select 1) select 2;
if (_ammoCount > 0) then {
_canUnloadMagazine = true;
};
_canUnloadMagazine