import struct AICommandNodeFunction
{
	import var order : Uint32;
	import var nodeType : CName;
	import var commandCategory : CName;
	import var friendlyName : String;
	import var paramsType : CName;
	import var nodeColor : Color;
}

import class AICommandNodeFunctionProvider extends IScriptable
{

	private static function Add( functions : ref< array< AICommandNodeFunction > >, nodeType : CName, category : CName, const friendlyName : ref< String >, paramsType : CName, color : Color )
	{
		var fn : AICommandNodeFunction;
		fn.order = ( ( Uint32 )( functions.Size() ) );
		fn.nodeType = nodeType;
		fn.commandCategory = category;
		fn.friendlyName = friendlyName;
		fn.paramsType = paramsType;
		fn.nodeColor = color;
		functions.PushBack( fn );
	}

	public static function CollectFunctions() : array< AICommandNodeFunction >
	{
		var functions : array< AICommandNodeFunction >;
		var green : Color;
		var red : Color;
		var yellow : Color;
		var gray : Color;
		green = Color( 100, 200, 100, 255 );
		red = Color( 150, 27, 27, 255 );
		yellow = Color( 204, 202, 99, 255 );
		gray = Color( 128, 128, 128, 255 );
		Add( functions, 'Move', 'move', "Move On Spline", 'questMoveOnSplineParams', green );
		Add( functions, 'Move', 'move', "Move To", 'questMoveToParams', green );
		Add( functions, 'Move', 'move', "Rotate To", 'questRotateToParams', green );
		Add( functions, 'Move', 'move', "Patrol", 'questPatrolParams', green );
		Add( functions, 'Move', 'move', "Follow", 'questFollowParams', green );
		Add( functions, 'Move', 'move', "Join Crowd", 'questJoinCrowdParams', green );
		Add( functions, 'Move', 'move', "Move To Cover", 'AIMoveToCoverCommandParams', green );
		Add( functions, 'Move', 'move', "Stop Cover", 'AIStopCoverCommandParams', green );
		Add( functions, 'Move', 'move', "Hold Position", 'AIHoldPositionCommandParams', green );
		Add( functions, 'Combat', 'combat', "Combat Target", 'questCombatNodeParams_CombatTarget', red );
		Add( functions, 'Combat', 'combat', "Combat Threat", 'AIInjectCombatThreatCommandParams', red );
		Add( functions, 'Combat', 'combat', "Shoot", 'questCombatNodeParams_ShootAt', red );
		Add( functions, 'Combat', 'combat', "Force Shoot", 'AIForceShootCommandParams', red );
		Add( functions, 'Combat', 'combat', "Use Cover", 'questCombatNodeParams_UseCover', red );
		Add( functions, 'Combat', 'combat', "Throw Grenade", 'questCombatNodeParams_ThrowGrenade', red );
		Add( functions, 'Combat', 'combat', "Primary Weapon", 'questCombatNodeParams_PrimaryWeapon', red );
		Add( functions, 'Combat', 'combat', "Secondary Weapon", 'questCombatNodeParams_SecondaryWeapon', red );
		Add( functions, 'Combat', 'combat', "Takedown", 'AIFollowerTakedownCommandParams', red );
		Add( functions, 'Combat', 'combat', "Look At Target", 'questCombatNodeParams_LookAtTarget', red );
		Add( functions, 'Combat', 'combat', "Aim At Target", 'AIAimAtTargetCommandParams', red );
		Add( functions, 'Combat', 'combat', "Melee Attack", 'AIMeleeAttackCommandParams', red );
		Add( functions, 'Combat', 'combat', "Set Combat Preset", 'AISetCombatPresetCommandParams', red );
		Add( functions, 'Combat', 'combat', "Background Combat", 'AIBackgroundCombatCommandParams', red );
		Add( functions, 'Immediate', 'immediate', "Assign Role", 'AIAssignRoleCommandParams', yellow );
		Add( functions, 'Immediate', 'immediate', "Clear Role", 'AIClearRoleCommandParams', yellow );
		Add( functions, 'Immediate', 'immediate', "Restrict Movement", 'questCombatNodeParams_RestrictMovementToArea', yellow );
		Add( functions, 'Immediate', 'immediate', "Join Target's Squad", 'AIJoinTargetsSquadCommandParams', yellow );
		Add( functions, 'Immediate', 'immediate', "Flathead Set Solo Mode", 'AIFlatheadSetSoloModeCommandParams', yellow );
		Add( functions, 'Move', 'move', "Scan Target", 'AIScanTargetCommandParams', gray );
		return functions;
	}

}

