class VentilationEffector extends ActivatedDeviceTransfromAnim
{
	protected var m_effectComponent : IPlacedComponent;

	protected event OnRequestComponents( ri : EntityRequestComponentsInterface )
	{
		super.OnRequestComponents( ri );
		EntityRequestComponentsInterface.RequestComponent( ri, 'particleComponent', 'IPlacedComponent', false );
	}

	protected event OnTakeControl( ri : EntityResolveComponentsInterface )
	{
		super.OnTakeControl( ri );
		m_effectComponent = ( ( IPlacedComponent )( EntityResolveComponentsInterface.GetComponent( ri, 'particleComponent' ) ) );
		m_controller = ( ( VentilationEffectorController )( EntityResolveComponentsInterface.GetComponent( ri, 'controller' ) ) );
	}

	protected event OnGameAttached()
	{
		super.OnGameAttached();
		if( GetDeviceState() == EDeviceStatus.ON )
		{
			SetEffects( true );
		}
		else
		{
			SetEffects( false );
		}
	}

	protected const override function GetController() : VentilationEffectorController
	{
		return ( ( VentilationEffectorController )( m_controller ) );
	}

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

	protected override function PushPersistentData()
	{
		super.PushPersistentData();
	}

	protected event OnToggleEffect( evt : ToggleEffect )
	{
		if( GetDeviceState() == EDeviceStatus.ON )
		{
			SetEffects( true );
		}
		else
		{
			SetEffects( false );
		}
		SetGameplayRoleToNone();
	}

	protected function SetEffects( state : Bool )
	{
		m_effectComponent.Toggle( state );
	}

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

}

class TimerEvent extends Event
{
}

