2015-01-13 03:23:14 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-29 07:38:46 +00:00
|
|
|
ADDON = false;
|
|
|
|
|
2016-02-22 14:20:36 +00:00
|
|
|
#include "XEH_PREP.hpp"
|
2015-01-29 07:38:46 +00:00
|
|
|
|
2016-03-05 16:15:56 +00:00
|
|
|
if (isNil "CBA_fnc_getMagazineIndex") then {
|
|
|
|
CBA_fnc_getMagazineIndex = {
|
2016-03-05 16:11:20 +00:00
|
|
|
params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]];
|
2016-03-01 22:26:20 +00:00
|
|
|
|
2016-03-05 16:11:20 +00:00
|
|
|
private _displayName = getText (configFile >> "CfgMagazines" >> _magazine >> "displayName");
|
2016-03-01 22:26:20 +00:00
|
|
|
|
2016-03-05 16:11:20 +00:00
|
|
|
if (_displayName isEqualTo "") exitWith {[]};
|
2016-03-01 22:26:20 +00:00
|
|
|
|
2016-03-05 16:18:41 +00:00
|
|
|
(magazinesDetail _unit select {_x find _displayName == 0}) apply {_x = _x splitString "[:]"; _x select (count _x - 1)};
|
2016-03-05 16:11:20 +00:00
|
|
|
};
|
2016-03-01 22:26:20 +00:00
|
|
|
};
|
|
|
|
|
2015-01-29 07:38:46 +00:00
|
|
|
ADDON = true;
|