2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-08-22 13:09:08 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
|
|
|
* Retrieve muzzle name from config.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Magazine Classname <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2016-09-02 23:39:34 +00:00
|
|
|
* "magazine" call ace_advanced_throwing_fnc_getMuzzle
|
2016-08-22 13:09:08 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_magazineClassname"];
|
|
|
|
|
|
|
|
_magazineClassname = toLower _magazineClassname;
|
|
|
|
private _throwMuzzles = getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
|
|
|
|
|
|
|
_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLower _x})};
|
|
|
|
|
|
|
|
[_throwMuzzles select 0, ""] select (_throwMuzzles isEqualTo [])
|