Update fnc_replaceUniqueItemsLoadout.sqf (#9297)

This commit is contained in:
johnb432 2023-07-29 00:01:42 +02:00 committed by GitHub
parent add312cbf1
commit 7ef9d19bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,11 +100,14 @@ private _cfgVehicles = configFile >> "CfgVehicles";
{ {
// Magazines in weapons have 2 entries: Name and ammo count // Magazines in weapons have 2 entries: Name and ammo count
if (_forEachIndex in [4, 5]) then { if (_forEachIndex in [4, 5]) then {
_x params ["_magazine"]; _x params [["_magazine", ""], "_count"];
if (_magazine != "") then {
_uniqueBaseCfgText = (getText (_cfgMagazines >> _magazine >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); _uniqueBaseCfgText = (getText (_cfgMagazines >> _magazine >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName);
if (_uniqueBaseCfgText != "") then { if (_uniqueBaseCfgText != "") then {
_weaponsInfo set [_forEachIndex, _uniqueBaseCfgText]; _weaponsInfo set [_forEachIndex, [_uniqueBaseCfgText, _count]];
};
}; };
} else { } else {
// Other // Other