//==========================================================================================
//
//	fa_2tanks_b1.gm
//
//	Who	When		What
//------------------------------------------------------------------------------------------
//	MickyP	21 June 2010	Initial Script
//	palota	21 July 2012	command posts can be built by both teams, enabled health and ammo cabinets, fixed switches and tanks availabilities, ESCORT goals are not disabled if tank is damaged
//	=F|A=Buckwild	29 December 2020  	Renamed 2tanks.way
//    Update with omni-bot_0_87_ET_waypoint_mod  
//
//==========================================================================================
//

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

};

global OnMapLoad = function()
{
	// Register callback functions
	OnTrigger( "MISSING_STRING", Map.Allied_Base_Defence_Built );
	OnTrigger( "MISSING_STRING", Map.Allied_tank_Built );
	OnTrigger( "MISSING_STRING", Map.Axis_Base_Defence_Built );
	OnTrigger( "MISSING_STRING", Map.Axis_tank_Built );
	OnTrigger( "MISSING_STRING", Map.East_Command_Post_Built );
	OnTrigger( "MISSING_STRING", Map.East_Signal_Box_Door_Built );
	OnTrigger( "MISSING_STRING", Map.East_Tank_Barrier_Built );
	OnTrigger( "MISSING_STRING", Map.West_Command_Post_Built );
	OnTrigger( "MISSING_STRING", Map.West_Signal_Box_Door_Built );
	OnTrigger( "MISSING_STRING", Map.West_Tank_Barrier_Built );
	OnTrigger( "MISSING_STRING", Map.Allied_Base_Defence_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Axis_Base_Defence_Destroyed );
	OnTrigger( "MISSING_STRING", Map.East_Command_Post_Destroyed );
	OnTrigger( "MISSING_STRING", Map.East_Signal_Box_Door_Destroyed );
	OnTrigger( "MISSING_STRING", Map.East_Tank_Barrier_Destroyed );
	OnTrigger( "MISSING_STRING", Map.West_Command_Post_Destroyed );
	OnTrigger( "MISSING_STRING", Map.West_Signal_Box_Door_Destroyed );
	OnTrigger( "MISSING_STRING", Map.West_Tank_Barrier_Destroyed );
	OnTrigger( "MISSING_STRING", Map.v1_base_flag_Axis_Captured );
	OnTrigger( "MISSING_STRING", Map.v1_base_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_Axis_tank =
		{
		},
		BUILD_Allied_tank =
		{
		},
		BUILD_West_Signal_Box_Door =
		{
		},
		PLANT_West_Signal_Box_Door =
		{
		},
		BUILD_East_Signal_Box_Door =
		{
		},
		PLANT_East_Signal_Box_Door =
		{
		},
		CHECKPOINT_v1_base_flag =
		{
		},
		BUILD_West_Command_Post =
		{
		},
		PLANT_West_Command_Post =
		{
		},
		BUILD_East_Command_Post =
		{
		},
		PLANT_East_Command_Post =
		{
		},
		BUILD_East_Tank_Barrier =
		{
		},
		PLANT_East_Tank_Barrier =
		{
		},
		BUILD_West_Tank_Barrier =
		{
		},
		PLANT_West_Tank_Barrier =
		{
		},
		BUILD_Allied_Base_Defence =
		{
		},
		PLANT_Allied_Base_Defence =
		{
		},
		BUILD_Axis_Base_Defence =
		{
		},
		PLANT_Axis_Base_Defence =
		{
		},
	};
	Util.Routes(MapRoutes);
};
