ACE3/addons/intelitems/XEH_preInit.sqf
2024-03-28 13:57:23 -05:00

34 lines
958 B
Plaintext

#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
if (isServer) then {
// Master Count - only on server and needed before postInit
GVAR(intelCount) = 0;
// Map of all magazine ids and their corresponding intel index
GVAR(intelMap) = [true] call CBA_fnc_createNamespace;
publicVariable QGVAR(intelMap);
// Namespace of intel indices and their corresponding data
GVAR(intelData) = [true] call CBA_fnc_createNamespace;
publicVariable QGVAR(intelData);
[QGVAR(handleMagIndex), LINKFUNC(handleMagIndex)] call CBA_fnc_addEventHandler;
[QGVAR(setObjectData), LINKFUNC(setObjectData)] call CBA_fnc_addEventHandler;
};
if (hasInterface) then {
// Array of all open controls groups
GVAR(controlsGroups) = [];
// Hash to track controls group positions on map between closing
GVAR(controlsData) = [] call CBA_fnc_hashCreate;
};
ADDON = true;