class OdaCementBag extends InteractiveDevice
{
	default m_controllerTypeName = 'OdaCementBagController';
	private var m_onCooldown : Bool;

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

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

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

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

	protected event OnHitEvent( hit : gameHitEvent )
	{
		var evt : DelayEvent;
		if( !( m_onCooldown ) )
		{
			m_onCooldown = true;
			GetDevicePS().GetDeviceOperationsContainer().Execute( 'cement_cloud_VFX', this );
			GetDevicePS().GetDeviceOperationsContainer().Execute( 'cement_status_effect', this );
			evt = new DelayEvent;
			GameInstance.GetDelaySystem( GetGame() ).DelayEvent( this, evt, GetDevicePS().GetCementCooldown() );
		}
	}

	protected event OnDelayEvent( evt : DelayEvent )
	{
		m_onCooldown = false;
	}

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

	protected const override function HasAnyDirectInteractionActive() : Bool
	{
		return true;
	}

}

