class GlitchedTurret extends Device
{
	default m_controllerTypeName = 'GlitchedTurretController';
	var animFeature : AnimFeature_SensorDevice;

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

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

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

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

	protected event OnGameAttached()
	{
		animFeature = new AnimFeature_SensorDevice;
		super.OnGameAttached();
	}

	protected override function TurnOnDevice()
	{
		animFeature.isTurnedOn = true;
		ApplyAnimFeatureToReplicate( this, 'SensorDeviceData', animFeature );
		super.TurnOnDevice();
	}

	protected event OnQuestForceGlitch( evt : QuestForceGlitch )
	{
		animFeature.isControlled = true;
		ApplyAnimFeatureToReplicate( this, 'SensorDeviceData', animFeature );
		super.RestorePower();
	}

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

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

}

