ACE3/addons/csw/functions/fnc_getCarryMagazine.sqf

27 lines
740 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
/*
* Author: PabstMirror, Dystopian
2023-12-18 16:47:01 +00:00
* Gets magazine that the player can carry, suitable to vehicle magazine.
*
* Arguments:
* 0: Vehicle Magazine <STRING>
*
* Return Value:
* Carry Magazine <STRING>
*
* Example:
* "1Rnd_GAT_missiles" call ace_csw_fnc_getCarryMagazine
*
2023-07-13 07:42:30 +00:00
* Public: Yes
*/
2023-07-13 07:42:30 +00:00
params [["_vehicleMag", "", [""]]];
2024-07-28 09:41:25 +00:00
GVAR(vehicleMagCache) getOrDefaultCall [_vehicleMag, {
private _groups = "getNumber (_x >> _vehicleMag) == 1 && {isClass (configFile >> 'CfgMagazines' >> configName _x)}" configClasses (configFile >> QGVAR(groups));
_carryMag = configName (_groups param [0, configNull]);
TRACE_2("setting cache",_vehicleMag,_carryMag);
2024-07-28 09:41:25 +00:00
_carryMag
}, true] // return