//==========================================================================================
//
//	firetrail.gm
//
//	Who                  	When		What
//------------------------------------------------------------------------------------------
//	maker@bigsighstudios.com	28 September 2018	Initial Script
//
//==========================================================================================
//

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

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

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

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

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

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

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

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

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

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

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

};

global OnMapLoad = function()
{
	// Register callback functions
	OnTrigger( "MISSING_STRING", Map.BUILD_2_Stage_Defense_Built );
	OnTrigger( "MISSING_STRING", Map.Command_Post_Built );
	OnTrigger( "MISSING_STRING", Map.Side_Entrance_Built );
	OnTrigger( "MISSING_STRING", Map.PLANT_2_Stage_Defense_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Axis_Firetrail_Pumpstation_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Command_Post_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Main_Entrance_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Side_Entrance_Destroyed );
	OnTrigger( "MISSING_STRING", Map.westbunker_flag_Axis_Captured );
	OnTrigger( "MISSING_STRING", Map.westbunker_flag_Allies_Captured );

	//~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_Side_Entrance =
		{
		},
		PLANT_Side_Entrance =
		{
		},
		BUILD_Command_Post =
		{
		},
		PLANT_Command_Post =
		{
		},
		BUILD_2_Stage_Defense =
		{
		},
		PLANT_2_Stage_Defense =
		{
		},
		PLANT_Main_Entrance =
		{
		},
		CHECKPOINT_westbunker_flag =
		{
		},
		PLANT_Axis_Firetrail_Pumpstation =
		{
		},
	};
	Util.Routes(MapRoutes);
};
