2015-10-03 23:26:38 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Returns the magazine of the units rangefinder.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Magazine of the units binocular <STRING>
|
|
|
|
*
|
|
|
|
* Example:
|
2015-12-04 18:37:37 +00:00
|
|
|
* player call ace_common_fnc_binocularMagazine
|
2015-10-03 23:26:38 +00:00
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-12-04 18:37:37 +00:00
|
|
|
params [["_unit", objNull, [objNull]]];
|
2015-10-03 23:26:38 +00:00
|
|
|
|
2015-12-04 18:37:37 +00:00
|
|
|
private _binocular = binocular _unit;
|
2015-10-04 10:10:08 +00:00
|
|
|
|
2015-12-04 18:37:37 +00:00
|
|
|
scopeName "main";
|
2015-10-03 23:26:38 +00:00
|
|
|
|
2015-12-04 18:37:37 +00:00
|
|
|
{
|
|
|
|
if ((_x select 0) isEqualTo _binocular) then {
|
|
|
|
// note: if there is no magazine, _x(4,0) will be nil, which skips the breakOut.
|
|
|
|
(_x select 4 select 0) breakOut "main";
|
|
|
|
};
|
|
|
|
false
|
|
|
|
} count weaponsitems _unit;
|
2015-10-03 23:26:38 +00:00
|
|
|
|
2015-12-04 18:37:37 +00:00
|
|
|
""
|