class Mainframe extends BaseAnimatedDevice
{
	default m_controllerTypeName = 'MainframeController';

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

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

	protected event OnSetQuestFact( evt : FactQuickHack )
	{
		var properties : ComputerQuickHackData;
		properties = evt.GetFactProperties();
		if( properties.operationType == EMathOperationType.Set )
		{
			SetFactValue( GetGame(), properties.factName, properties.factValue );
		}
		else
		{
			AddFact( GetGame(), properties.factName, properties.factValue );
		}
	}

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

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

}

