class UseWorkspotCommandHandler extends AICommandHandlerBase
{
	protected editable inlined var m_outMoveToWorkspot : AIArgumentMapping;
	protected editable inlined var m_outForceEntryAnimName : AIArgumentMapping;
	protected editable inlined var m_outContinueInCombat : AIArgumentMapping;

	protected export override function Activate( context : ScriptExecutionContext )
	{
		SetUpdateInterval( context, RandomizeOffsetForUpdateInterval( 0.2 ) );
	}

	protected override function UpdateCommand( context : ScriptExecutionContext, command : AICommand ) : AIbehaviorUpdateOutcome
	{
		var typedCommand : AIBaseUseWorkspotCommand;
		typedCommand = ( ( AIBaseUseWorkspotCommand )( command ) );
		if( !( typedCommand ) )
		{
			return AIbehaviorUpdateOutcome.FAILURE;
		}
		ScriptExecutionContext.SetMappingValue( context, m_outMoveToWorkspot, typedCommand.moveToWorkspot );
		ScriptExecutionContext.SetMappingValue( context, m_outForceEntryAnimName, typedCommand.forceEntryAnimName );
		ScriptExecutionContext.SetMappingValue( context, m_outContinueInCombat, typedCommand.continueInCombat );
		return AIbehaviorUpdateOutcome.IN_PROGRESS;
	}

}

