PKHeX/PKHeX.Core/Editing/Saves/Slots/SlotViewInfo.cs

16 lines
526 B
C#
Raw Normal View History

namespace PKHeX.Core
{
/// <summary>
/// Tuple containing data for a <see cref="Slot"/> and the originating <see cref="View"/>
/// </summary>
/// <typeparam name="T"></typeparam>
public sealed class SlotViewInfo<T>
{
public ISlotInfo Slot;
public ISlotViewer<T> View;
public PKM ReadCurrent() => Slot.Read(View.SAV);
public bool CanWriteTo() => Slot.CanWriteTo(View.SAV);
public WriteBlockedMessage CanWriteTo(PKM pkm) => Slot.CanWriteTo(View.SAV, pkm);
}
}