//==========================================================================================
//
//	thehouse.gm
//
//	Who  	When		What
//------------------------------------------------------------------------------------------
//	ETPlayer	16 March 2020	Initial Script
//
//==========================================================================================
//

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

};

global OnMapLoad = function()
{
	// Register callback functions
	OnTrigger( "MISSING_STRING", Map.Neutral_Command_Post_Built );
	OnTrigger( "MISSING_STRING", Map.northern_door_to_the_corridor_Built );
	OnTrigger( "MISSING_STRING", Map.southern_door_to_the_corridor_Built );
	OnTrigger( "MISSING_STRING", Map.staircase_shield_Built );
	OnTrigger( "MISSING_STRING", Map.Neutral_Command_Post_Destroyed );
	OnTrigger( "MISSING_STRING", Map.eastern_door_to_the_lab_Destroyed );
	OnTrigger( "MISSING_STRING", Map.northern_door_to_the_corridor_Destroyed );
	OnTrigger( "MISSING_STRING", Map.southern_door_to_the_corridor_Destroyed );
	OnTrigger( "MISSING_STRING", Map.staircase_shield_Destroyed );
	OnTrigger( "MISSING_STRING", Map.wall_brick_Destroyed );
	OnTrigger( "MISSING_STRING", Map.western_door_to_the_lab_Destroyed );
	OnTrigger( "MISSING_STRING", Map.key1_Taken );
	OnTrigger( "MISSING_STRING", Map.key2_Taken );
	OnTrigger( "MISSING_STRING", Map.key1_Returned );
	OnTrigger( "MISSING_STRING", Map.key2_Returned );
	OnTrigger( "MISSING_STRING", Map.key1_Secured );
	OnTrigger( "MISSING_STRING", Map.key2_Secured );
	OnTrigger( "MISSING_STRING", Map.livingroom_Axis_Captured );
	OnTrigger( "MISSING_STRING", Map.livingroom_Allies_Captured );

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

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

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