//==========================================================================================
//
//  psl_ctf.gm
//
// Who   	When		What
//------------------------------------------------------------------------------------------
// palota	16 August 2025	Initial Script
//
//==========================================================================================
//

global OnMapLoad = function()
{
	OnTriggerRegion(Vec3(-609,-674,32), 350, RegionTrigger.DisableCombatMovement); //lava
	OnTriggerRegion(Vec3(1311,1696,32), 350, RegionTrigger.DisableCombatMovement);

	SetGoalPriority("PLANT.*", 0.8, 0, CLASS.ENGINEER);
	Util.SetMaxUsers(1, ".*Command_Post");

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

global InitializeRoutes = function()
{
	r={
		ROUTE_r1 ={},
		ROUTE_r2 ={},
		ROUTE_r4 ={ROUTE_r3 ={}},
	};
	br={
		ROUTE_b1 = r,
		ROUTE_b2 = r,
		ROUTE_b3 = {Weight=2, ROUTE_b4 = r},
	};
	b={
		ROUTE_b1 ={},
		ROUTE_b2 ={},
		ROUTE_b4 ={ROUTE_b3 ={}},
	};
	rb={
		ROUTE_r1 = b,
		ROUTE_r2 = b,
		ROUTE_r3 = {Weight=2, ROUTE_r4 = b},
	};
	MapRoutes =
	{
		FLAG_allied_flag =
		{
			ROUTE_r_spawn = rb
		},
		FLAG_axis_flag =
		{
			ROUTE_b_spawn = br
		},
		CAPPOINT_r =
		{
			ROUTE_b_flag = br
		},
		CAPPOINT_b =
		{
			ROUTE_r_flag = rb
		},
	};
	Util.Routes(MapRoutes);
};
