mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Use getOrDefaultCall
This commit is contained in:
parent
1388f443cd
commit
b0504d7ba0
@ -17,12 +17,10 @@
|
||||
|
||||
params [["_vehicleMag", "", [""]]];
|
||||
|
||||
private _carryMag = GVAR(vehicleMagCache) get _vehicleMag;
|
||||
if (isNil "_carryMag") then {
|
||||
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]);
|
||||
GVAR(vehicleMagCache) set [_vehicleMag, _carryMag];
|
||||
TRACE_2("setting cache",_vehicleMag,_carryMag);
|
||||
};
|
||||
|
||||
_carryMag
|
||||
_carryMag
|
||||
}, true] // return
|
||||
|
Loading…
Reference in New Issue
Block a user