class UnstablePlatform extends BaseAnimatedDevice
{
	default m_controllerTypeName = 'BaseAnimatedDeviceController';

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

	protected event OnTakeControl( ri : EntityResolveComponentsInterface )
	{
		super.OnTakeControl( ri );
	}

	protected event OnAreaEnter( evt : AreaEnteredEvent )
	{
		var activator : weak< GameObject >;
		if( GetDevicePS().IsDisabled() || GetDevicePS().IsUnpowered() )
		{
			return false;
		}
		activator = ( ( GameObject )( EntityGameInterface.GetEntity( evt.activator ) ) );
		if( activator.IsPlayer() && GetDevicePS().IsActivated() )
		{
			GameInstance.GetPersistencySystem( GetGame() ).QueuePSEvent( GetDevicePS().GetID(), GetDevicePS().GetClassName(), GetDevicePS().ActionDeactivateDevice() );
		}
	}

}

