class ChestPress extends InteractiveDevice
{
	default m_controllerTypeName = 'ChestPressController';
	private var m_animFeatureData : AnimFeature_ChestPress;
	private var m_animFeatureDataName : CName;

	protected event OnRequestComponents( ri : EntityRequestComponentsInterface )
	{
		super.OnRequestComponents( ri );
	}

	protected event OnTakeControl( ri : EntityResolveComponentsInterface )
	{
		super.OnTakeControl( ri );
		m_controller = ( ( ChestPressController )( EntityResolveComponentsInterface.GetComponent( ri, 'controller' ) ) );
	}

	protected event OnGameAttached()
	{
		m_animFeatureData = new AnimFeature_ChestPress;
		m_animFeatureDataName = 'ChestPressData';
		super.OnGameAttached();
	}

	private const override function GetController() : ChestPressController
	{
		return ( ( ChestPressController )( m_controller ) );
	}

	public const override function GetDevicePS() : ChestPressControllerPS
	{
		return GetController().GetPS();
	}

	public const override function DeterminGameplayRole() : EGameplayRole
	{
		return EGameplayRole.Fall;
	}

	protected event OnChestPressWeightHack( evt : ChestPressWeightHack )
	{
		AddFact( GetGame(), GetDevicePS().GetFactOnQHack() );
	}

	protected event OnE3Hack_QuestPlayAnimationWeightLift( evt : E3Hack_QuestPlayAnimationWeightLift )
	{
		m_animFeatureData.lifting = true;
		ApplyAnimFeatureToReplicate( this, m_animFeatureDataName, m_animFeatureData );
	}

	protected event OnE3Hack_QuestPlayAnimationKillNPC( evt : E3Hack_QuestPlayAnimationKillNPC )
	{
		m_animFeatureData.lifting = false;
		m_animFeatureData.kill = true;
		ApplyAnimFeatureToReplicate( this, m_animFeatureDataName, m_animFeatureData );
	}

}

class AnimFeature_ChestPress extends AnimFeature
{
	editable var lifting : Bool;
	editable var kill : Bool;
}

