class LadderController extends ScriptableDeviceComponent
{

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

}

class LadderControllerPS extends ScriptableDeviceComponentPS
{
	default m_deviceName = "LocKey#2226";
	default m_tweakDBRecord = T"Devices.Ladder";
	default m_tweakDBDescriptionRecord = T"device_descriptions.Ladder";
	default m_shouldScannerShowStatus = false;

	public override function GetActions( out actions : array< DeviceAction >, context : GetActionsContext ) : Bool
	{
		if( EnterLadder.IsPlayerInAcceptableState( this, context ) )
		{
			actions.PushBack( ActionEnterLadder() );
		}
		SetActionIllegality( actions, m_illegalActions.regularActions );
		return true;
	}

	protected function ActionEnterLadder() : EnterLadder
	{
		var action : EnterLadder;
		action = new EnterLadder;
		action.SetUp( this );
		action.SetProperties();
		action.AddDeviceName( m_deviceName );
		action.CreateInteraction();
		return action;
	}

	public function OnEnterLadder( evt : EnterLadder ) : EntityNotificationType
	{
		EnterLadder.PushOnEnterLadderEventToPSM( GetPlayerMainObject() );
		return EntityNotificationType.SendThisEventToEntity;
	}

}

