//==========================================================================================
//
//	kastellederhennes.gm
//
//	Who                  	When		What
//------------------------------------------------------------------------------------------
//	maker@bigsighstudios.com	05 December 2017	Initial Script
//
//==========================================================================================
//

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

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

	French_Servants_Build_Crates_Built = function( trigger )
	{
		Util.MapDebugPrint( "French_Servants_Build_Crates_Built", true  );
	},
	
	French_Servants_Build_Crates_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "French_Servants_Build_Crates_Destroyed", true  );
	},

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

	Gas_Chamber_With_Evil_Relic_Build_Crates_Built = function( trigger )
	{
		Util.MapDebugPrint( "Gas_Chamber_With_Evil_Relic_Build_Crates_Built", true  );
	},
	
	Gas_Chamber_With_Evil_Relic_Build_Crates_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Gas_Chamber_With_Evil_Relic_Build_Crates_Destroyed", true  );
	},

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

	Primary_Bridge_Build_Crates_Built = function( trigger )
	{
		Util.MapDebugPrint( "Primary_Bridge_Build_Crates_Built", true  );
	},
	
	Primary_Bridge_Build_Crates_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Primary_Bridge_Build_Crates_Destroyed", true  );
	},

	Primary_Bridge_Build_Crates_1_Built = function( trigger )
	{
		Util.MapDebugPrint( "Primary_Bridge_Build_Crates_1_Built", true  );
	},
	
	Primary_Bridge_Build_Crates_1_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Primary_Bridge_Build_Crates_1_Destroyed", true  );
	},

	Radio_Tower_Build_Crates_Built = function( trigger )
	{
		Util.MapDebugPrint( "Radio_Tower_Build_Crates_Built", true  );
	},
	
	Radio_Tower_Build_Crates_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Radio_Tower_Build_Crates_Destroyed", true  );
	},

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

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

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

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

	Secondary_Bridge_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Secondary_Bridge_Destroyed", true  );
	},
	
	Secondary_Bridge_Build_Crates_Destroyed = function( trigger )
	{
		Util.MapDebugPrint( "Secondary_Bridge_Build_Crates_Destroyed", true  );
	},

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

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

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

global OnMapLoad = function()
{
	/*mg = GetGoal( "PLANT_Primary_Bridge_!" );
	mg.SetProperty( "tagname", "Primary Bridge" );

	mg = GetGoal( "PLANT_Primary_Bridge_too!" );
	mg.SetProperty( "tagname", "Primary Bridge too" );

	mg = GetGoal( "PLANT_Radio_Tower_!" );
	mg.SetProperty( "tagname", "Radio Tower" );

	mg = GetGoal( "PLANT_Secondary_Bridge_!" );
	mg.SetProperty( "tagname", "Secondary Bridge" );*/

	// Register callback functions
	OnTrigger( "MISSING_STRING", Map.Command_Post_Built );
	OnTrigger( "MISSING_STRING", Map.French_Servants_Build_Crates_Built );
	OnTrigger( "MISSING_STRING", Map.Gas_Chamber_With_Evil_Relic_Build_Crates_Built );
	OnTrigger( "MISSING_STRING", Map.Primary_Bridge_Build_Crates_Built );
	OnTrigger( "MISSING_STRING", Map.Primary_Bridge_Build_Crates_1_Built );
	OnTrigger( "MISSING_STRING", Map.Radio_Tower_Build_Crates_Built );
	OnTrigger( "MISSING_STRING", Map.Secondary_Bridge_Build_Crates_Built );
	OnTrigger( "MISSING_STRING", Map.Command_Post_Destroyed );
	OnTrigger( "MISSING_STRING", Map.French_Servants_Destroyed );
	OnTrigger( "MISSING_STRING", Map.French_Servants_Build_Crates_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Gas_Chamber_With_Evil_Relic_Build_Crates_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Gas_Chambers_With_Evil_Relic_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Primary_Bridge_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Primary_Bridge_Build_Crates_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Primary_Bridge_Build_Crates_1_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Primary_Bridge_too_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Radio_Tower_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Radio_Tower_Build_Crates_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Secondary_Bridge_Destroyed );
	OnTrigger( "MISSING_STRING", Map.Secondary_Bridge_Build_Crates_Destroyed );
	OnTrigger( "MISSING_STRING", Map.silver_crate_Taken );
	OnTrigger( "MISSING_STRING", Map.silver_crate_Returned );
	OnTrigger( "MISSING_STRING", Map.silver_crate_Secured );

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

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

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

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

global OnBotJoin = function( bot )
{
	bot.TargetBreakableDist = 90.0;

};
