#include "..\script_component.hpp"

if (!isServer) exitWith {};

// array of all respawn modules in the mission representing "bases"
GVARMAIN(baseObjects) = allMissionObjects "ModuleRespawnPosition_F";
publicVariable QGVARMAIN(baseObjects);

// Initializes the Dynamic Groups framework and groups
["Initialize", [true]] call BIS_fnc_dynamicGroups;

// initialize other modules
call EFUNC(common,logMissionInfo);
call EFUNC(fbcb2_assets,initServer);
call EFUNC(reinsert,initServer);

// globally disable zeus lightning bolt functionality
_curators = allMissionObjects "ModuleCurator_F";
{
	_x removeCuratorAddons ["CuratorOnly_Modules_F_Curator_Lightning"]; 
	_x removeCuratorAddons ["A3_Modules_F_Curator_Lightning"]; 
} foreach _curators;

// declare init complete to other modules
missionNamespace setVariable [QGVARMAIN(complete), true, true];

[
	LEVEL_INFO,
	QUOTE(COMPONENT),
	format["%1: version %2", QGVARMAIN(complete), QUOTE(VERSION_STR)],
	[["version", QUOTE(VERSION_STR)]]
] call EFUNC(common,log);

[
	LEVEL_DEBUG,
	QUOTE(COMPONENT),
	"postInit complete",
	[]
] call EFUNC(common,log);