//==========================================================================================
//
//	airbase.gm
//
//	Who       	When		What
//------------------------------------------------------------------------------------------
//	^1[UJE]^3Niek	15 April 2016	Initial Script
//
//==========================================================================================
//

global Map =
{
	Debug = 1, // please set to zero before distributing your script

	Fence_Built = function( trigger )
	{
		Util.MapDebugPrint( "Fence_Built" );
	},

	Generator_Built = function( trigger )
	{
		Util.MapDebugPrint( "Generator_Built" );
	},

	Neutral_Command_Post_Built = function( trigger )
	{
		Util.MapDebugPrint( "Neutral_Command_Post_Built" );
	},

	Tank_Built = function( trigger )
	{
		Util.MapDebugPrint( "Tank_Built" );
	},

	Tank_Barrier_Built = function( trigger )
	{
		Util.MapDebugPrint( "Tank_Barrier_Built" );
	},

	Axis_barracks_wall_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Axis_barracks_wall_Destroyed" );
	},

	Bunker_Sidewall_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Bunker_Sidewall_Destroyed" );
	},

	Fence_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Fence_Destroyed" );
	},

	Generator_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Generator_Destroyed" );
	},

	Neutral_Command_Post_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Neutral_Command_Post_Destroyed" );
	},

	documents_Taken = function( trigger )
	{
		Util.MapDebugPrint( "documents_Taken" );
	},

	fuel_can_Taken = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_Taken" );
	},

	fuel_can_2_Taken = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_2_Taken" );
	},

	fuel_can_3_Taken = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_3_Taken" );
	},

	documents_Returned = function( trigger )
	{
		Util.MapDebugPrint( "documents_Returned" );
	},

	fuel_can_Returned = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_Returned" );
	},

	fuel_can_2_Returned = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_2_Returned" );
	},

	fuel_can_3_Returned = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_3_Returned" );
	},

	documents_Secured = function( trigger )
	{
		Util.MapDebugPrint( "documents_Secured" );
	},

	fuel_can_Secured = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_Secured" );
	},

	fuel_can_2_Secured = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_2_Secured" );
	},

	fuel_can_3_Secured = function( trigger )
	{
		Util.MapDebugPrint( "fuel_can_3_Secured" );
	},

};

global OnMapLoad = function()
{
	// Register callback functions
	OnTrigger( "MISSING_STRING", Map.Fence_Built );
	OnTrigger( "MISSING_STRING", Map.Generator_Built );
	OnTrigger( "MISSING_STRING", Map.Neutral_Command_Post_Built );
	OnTrigger( "MISSING_STRING", Map.Tank_Built );
	OnTrigger( "MISSING_STRING", Map.Tank_Barrier_Built );
	OnTrigger( "MISSING_STRING", Map.Axis_barracks_wall_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Bunker_Sidewall_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Fence_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Generator_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Neutral_Command_Post_Destroyed );
	OnTrigger( "MISSING_STRING", Map.documents_Taken );
	OnTrigger( "MISSING_STRING", Map.fuel_can_Taken );
	OnTrigger( "MISSING_STRING", Map.fuel_can_2_Taken );
	OnTrigger( "MISSING_STRING", Map.fuel_can_3_Taken );
	OnTrigger( "MISSING_STRING", Map.documents_Returned );
	OnTrigger( "MISSING_STRING", Map.fuel_can_Returned );
	OnTrigger( "MISSING_STRING", Map.fuel_can_2_Returned );
	OnTrigger( "MISSING_STRING", Map.fuel_can_3_Returned );
	OnTrigger( "MISSING_STRING", Map.documents_Secured );
	OnTrigger( "MISSING_STRING", Map.fuel_can_Secured );
	OnTrigger( "MISSING_STRING", Map.fuel_can_2_Secured );
	OnTrigger( "MISSING_STRING", Map.fuel_can_3_Secured );

	//~Util.DisableGoal( ".*", true ); // all but routes
	//~SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_.*" );
	//~SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_.*" );

	// Max users per goal
	//Util.SetMaxUsers( 1, "MOUNTMG42_.*" );

	// Camp times
	//SetMapGoalProperties( "MOUNTMG42_.*", {MinCampTime=15, MaxCampTime=90} );


	Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed." );
};

global OnBotJoin = function( bot )
{
	// Uncomment for shootable breakables
	//~bot.TargetBreakableDist = 90.0;
	// Only set MaxViewDistance on maps with limited sight (e.g. fog)
	//~bot.MaxViewDistance = 2400;
};

global InitializeRoutes = function()
{
	MapRoutes =
	{
		BUILD_Tank =
		{
		},
		BUILD_Tank_Barrier =
		{
		},
		PLANT_Bunker_Sidewall =
		{
		},
		BUILD_Fence =
		{
		},
		PLANT_Fence =
		{
		},
		FLAG_fuel_can =
		{
		},
		PLANT_Axis_barracks_wall =
		{
		},
		FLAG_documents =
		{
		},
		FLAG_fuel_can_2 =
		{
		},
		FLAG_fuel_can_3 =
		{
		},
		BUILD_Generator =
		{
		},
		PLANT_Generator =
		{
		},
		BUILD_Neutral_Command_Post =
		{
		},
		PLANT_Neutral_Command_Post =
		{
		},
	};
	Util.Routes(MapRoutes);
};
