2023-09-12 18:58:10 +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"];
|
|
|
|
|
2024-03-07 21:08:13 +00:00
|
|
|
_magazineClassname = toLowerANSI _magazineClassname;
|
2016-08-22 13:09:08 +00:00
|
|
|
private _throwMuzzles = getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
|
|
|
|
2024-03-07 21:08:13 +00:00
|
|
|
_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLowerANSI _x})};
|
2016-08-22 13:09:08 +00:00
|
|
|
|
|
|
|
[_throwMuzzles select 0, ""] select (_throwMuzzles isEqualTo [])
|