if (!isServer) exitWith {};

_fixedAssets = [ 
	["Ares",  "USAF_A10",   0], 
	["Odyssey",  "RHSGREF_A29B_HIDF",   0], 
	["Hercules", "USAF_C130J",   0]
 
]; 
 
_rotaryAssets = [ 
	["Apollo",  "RHS_MELB_MH6M",   0], 
	["Artemis",  "RHS_MELB_AH6M",  0], 
	["Icarus",  "RHS_MELB_H6M",  0], 
	["Achilles", "RHS_CH_47F",   0], 
	["Hades",  "ej_MH60MDAP4",   0], 
	["Griffin",  "RHS_UH60M",   0], 
	["Dustoff",  "RHS_UH60M_MEV2",   0], 
	["Pegasus",  "B_T_VTOL_01_INFANTRY_F",   0], 
	["Spartan",  "B_T_VTOL_01_ARMED_F",   0], 
	["Orion", "RHS_AH64D",   0],
	["Athena",  "RHS_AH1Z",   0], 
	["Homer",  "RHS_UH1Y",   0], 
	["Atlas",  "rhsusf_CH53E_USMC",   0]
]; 
 
_homes = allMissionObjects "ModuleRespawnPosition_F";

{
	_home = _x;
	{
		_a = _home nearEntities [ _x select 1, 750]; 
		_x set [2, (_x select 2) + count _a];
	 
	} forEach _fixedAssets; 
} forEach _homes;

missionNamespace setVariable ["milsim_var_fixedAssets", _fixedAssets]; 

{
	_home = _x;
	{
		_a = _home nearEntities [ _x select 1, 750]; 
		_x set [2, (_x select 2) + count _a];
	 
	} forEach _rotaryAssets; 
} forEach _homes;
 
missionNamespace setVariable ["milsim_var_rotaryAssets", _rotaryAssets]; 

publicVariable "milsim_var_fixedAssets";
publicVariable "milsim_var_rotaryAssets";

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



missionNamespace setVariable ["milsim_complete", true];
diag_log text "[MILSIM] (initServer) milsim_complete: version 2.3";

publicVariable "milsim_complete";
