/*
	FILE: fnc_canUnload.sqf

	Name: tbd_m119_m119_fnc_canUnload

	Author(s):
		ilbinek

	Description:
		Check if the M119 can be unloaded

	Parameters:
		_arty	- object	- M119 to be checked

	Returns:
		bool - true if the M119 can be unloaded, false otherwise
	
	Examples:
		> [_arty] call tbd_m119_m119_fnc_canUnload;

	Public:
		No
*/

#include "..\script_component.hpp"

params ["_arty"];

if !(_arty getVariable[QGVAR(breech), false]) exitWith {false};

// Check of the mortar is empty
private _mags = _arty magazinesTurret [0];
if (count _mags == 0) exitWith {false};
true
