ACE3/addons/minedetector/XEH_preStart.sqf
Dedmen Miller 0c8c924487 Minedetector - Cache detectableClasses (#6805)
* Cache minedetector detectableClasses

* use compileFinal
2019-02-17 12:31:34 -06:00

20 lines
683 B
Plaintext

#include "script_component.hpp"
#include "XEH_PREP.hpp"
// Cache detectable classes, see XEH_postInit.sqf
private _detectableClasses = [];
{
if ((getNumber (_x >> QGVAR(detectable))) == 1) then {
_detectableClasses pushBackUnique configName _x;
};
} forEach (configProperties [configFile >> "CfgVehicles", "isClass _x", true]);
{
if ((getNumber (_x >> QGVAR(detectable))) == 1) then {
_detectableClasses pushBackUnique configName _x;
};
} forEach (configProperties [configFile >> "CfgAmmo", "isClass _x", true]);
TRACE_1("compiled",count _detectableClasses);
uiNamespace setVariable [QGVAR(detectableClasses), compileFinal str _detectableClasses];