//==========================================================================================
//
//	winterbase.gm
//
//	Who  	When		What
//------------------------------------------------------------------------------------------
//	ETPlayer	26 August 2022	Initial Script
//
//==========================================================================================
//

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

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

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

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

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

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

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

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

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

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

};

global OnMapLoad = function()
{
	// Register callback functions
	OnTrigger( "MISSING_STRING", Map.Command_Post_Built );
	OnTrigger( "MISSING_STRING", Map.Allied_Defence_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Command_Post_Destroyed );
	OnTrigger( "MISSING_STRING", Map.commanders_log_Taken );
	OnTrigger( "MISSING_STRING", Map.gold_crate_Taken );
	OnTrigger( "MISSING_STRING", Map.commanders_log_Returned );
	OnTrigger( "MISSING_STRING", Map.gold_crate_Returned );
	OnTrigger( "MISSING_STRING", Map.commanders_log_Secured );
	OnTrigger( "MISSING_STRING", Map.gold_crate_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 =
	{
		FLAG_commanders_log =
		{
		},
		FLAG_gold_crate =
		{
		},
		BUILD_Command_Post =
		{
		},
		PLANT_Command_Post =
		{
		},
		PLANT_Allied_Defence =
		{
		},
	};
	Util.Routes(MapRoutes);
};
