2023-10-24 04:55:06 +00:00
|
|
|
#include "..\script_component.hpp"
|
|
|
|
// call compileScript ["z\ace\addons\explosives\dev\test_magazines.sqf"];
|
|
|
|
|
|
|
|
INFO("--- Checking Explosive Mags ---");
|
|
|
|
|
|
|
|
private _explosivesMags = compatibleMagazines "Put";
|
|
|
|
private _setupHash = createHashMap;
|
2024-08-14 17:53:40 +00:00
|
|
|
|
2023-10-24 04:55:06 +00:00
|
|
|
{
|
|
|
|
private _mag = _x;
|
|
|
|
private _cfg = configFile >> "CfgMagazines" >> _mag;
|
|
|
|
private _scope = getNumber (_cfg >> "scope");
|
|
|
|
|
2024-08-14 17:53:40 +00:00
|
|
|
private _setupObject = getText (_cfg >> QGVAR(setupObject));
|
|
|
|
|
2023-10-24 04:55:06 +00:00
|
|
|
if (_setupObject == "") then {
|
|
|
|
WARNING_2("[%1](scope %2) has no setupObject",_mag,_scope);
|
2024-08-14 17:53:40 +00:00
|
|
|
continue;
|
2023-10-24 04:55:06 +00:00
|
|
|
};
|
2024-08-14 17:53:40 +00:00
|
|
|
|
2023-10-24 04:55:06 +00:00
|
|
|
if (!isClass (configFile >> "CfgVehicles" >> _setupObject)) then {
|
|
|
|
ERROR_2("[%1](scope %2) has invalid setup object",_mag,_scope);
|
|
|
|
};
|
2024-08-14 17:53:40 +00:00
|
|
|
|
|
|
|
if (((_setupHash getOrDefault [_setupObject, [], true]) pushBack _mag) > 0) then {
|
2023-10-24 04:55:06 +00:00
|
|
|
INFO_2("[%1] setupObject has multiple mags %2",_setupObject,_setupHash get _setupObject);
|
|
|
|
};
|
|
|
|
} forEach _explosivesMags;
|