class InspectionObject extends GameObject
{
	var m_interaction : InteractionComponent;

	protected event OnRequestComponents( ri : EntityRequestComponentsInterface )
	{
		EntityRequestComponentsInterface.RequestComponent( ri, 'interaction', 'InteractionComponent', true );
	}

	protected event OnTakeControl( ri : EntityResolveComponentsInterface )
	{
		m_interaction = ( ( InteractionComponent )( EntityResolveComponentsInterface.GetComponent( ri, 'interaction' ) ) );
	}

	protected event OnInteractionChoice( choiceEvent : InteractionChoiceEvent )
	{
		var choicesArr : array< InteractionChoice >;
		if( choiceEvent.choice.choiceMetaData.tweakDBName == "Inspect" )
		{
			m_interaction.ResetChoices();
			choicesArr.PushBack( CreateChoice( "Inspected", 1 ) );
			m_interaction.SetChoices( choicesArr );
		}
		else if( choiceEvent.choice.choiceMetaData.tweakDBName == "Inspected" )
		{
			m_interaction.ResetChoices();
			choicesArr.PushBack( CreateChoice( "Inspect", 2 ) );
			m_interaction.SetChoices( choicesArr );
		}
	}

	private function CreateChoice( const choiceName : ref< String >, data : Int32 ) : InteractionChoice
	{
		var choice : InteractionChoice;
		choice.choiceMetaData.tweakDBName = choiceName;
		choice.caption = choice.choiceMetaData.tweakDBName;
		choice.data.PushBack( data );
		return choice;
	}

}

