mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Improved config caching
This commit is contained in:
parent
c3fea42bce
commit
5d2905ca42
@ -58,14 +58,18 @@ if (count _weaponMagazines == 0) then {
|
||||
_weaponMagazines append _muzzleMagazines;
|
||||
};
|
||||
} forEach _muzzles;
|
||||
{
|
||||
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||
_weaponMagazines set [_forEachIndex, [_x, _ammoType]];
|
||||
} forEach _weaponMagazines;
|
||||
missionNamespace setVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], _weaponMagazines];
|
||||
};
|
||||
|
||||
_magazine = "";
|
||||
{
|
||||
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||
EXPLODE_2_PVT(_x,_magazineType,_ammoType)
|
||||
if (_ammoType == _ammo) exitWith {
|
||||
_magazine = _x;
|
||||
_magazine = _magazineType;
|
||||
};
|
||||
} forEach _weaponMagazines;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user