class WindowController extends DoorController
{

	public const override function GetPS() : WindowControllerPS
	{
		return ( ( WindowControllerPS )( GetBasePS() ) );
	}

}

class WindowControllerPS extends DoorControllerPS
{
	default m_deviceName = "LocKey#78";
	default m_tweakDBRecord = T"Devices.Window";
	default m_tweakDBDescriptionRecord = T"device_descriptions.Window";
	private instanceeditable inlined var m_windowSkillChecks : EngDemoContainer;

	protected event OnInstantiated()
	{
		super.OnInstantiated();
		if( !( IsStringValid( m_deviceName ) ) )
		{
			m_deviceName = "LocKey#78";
		}
		m_doorProperties.m_automaticallyClosesItself = false;
	}

	protected override function GetSkillCheckContainerForSetup() : BaseSkillCheckContainer
	{
		return m_windowSkillChecks;
	}

	protected override function GameAttached() {}

	public override function GetDeviceIconPath() : String
	{
		return "base/gameplay/gui/brushes/devices/icon_door.widgetbrush";
	}

	protected override function OnActionDemolition( evt : ActionDemolition ) : EntityNotificationType
	{
		if( !( evt.WasPassed() ) )
		{
			return EntityNotificationType.DoNotNotifyEntity;
		}
		super.OnActionDemolition( evt );
		if( evt.IsCompleted() )
		{
			OnForceOpen( ActionForceOpen() );
			DisableDevice();
		}
		return EntityNotificationType.SendThisEventToEntity;
	}

	protected override function GetDeviceIconTweakDBID() : TweakDBID
	{
		return T"DeviceIcons.DoorDeviceIcon";
	}

	protected override function GetBackgroundTextureTweakDBID() : TweakDBID
	{
		return T"DeviceIcons.DoorDeviceBackground";
	}

}

