Add accessor for TrainerCard block

This commit is contained in:
Kurt
2019-11-18 17:57:33 -08:00
parent adf33404b3
commit 86796cd67a
4 changed files with 5 additions and 4 deletions

View File

@@ -13,5 +13,6 @@ public interface ISaveBlock8Main
Fused8 Fused { get; }
Daycare8 Daycare { get; }
Record8 Records { get; }
TrainerCard8 TrainerCard { get; }
}
}

View File

@@ -4,10 +4,6 @@ namespace PKHeX.Core
{
public class SaveBlockAccessorSWSH : ISaveBlockAccessor<SCBlock>, ISaveBlock8Main
{
private static readonly SCBlock[] BlockInfoSWSH =
{
};
public IReadOnlyList<SCBlock> BlockInfo { get; }
public Box8 BoxInfo { get; }
public Party8 PartyInfo { get; }
@@ -20,6 +16,7 @@ public class SaveBlockAccessorSWSH : ISaveBlockAccessor<SCBlock>, ISaveBlock8Mai
public Fused8 Fused { get; }
public Daycare8 Daycare { get; }
public Record8 Records { get; }
public TrainerCard8 TrainerCard{ get; }
public SaveBlockAccessorSWSH(SAV8SWSH sav)
{
@@ -31,6 +28,7 @@ public SaveBlockAccessorSWSH(SAV8SWSH sav)
MyStatus = new MyStatus8(sav, GetBlock(IMyStatus));
Misc = new Misc8(sav, GetBlock(IMisc));
BoxLayout = new BoxLayout8(sav, GetBlock(IBoxLayout));
TrainerCard = new TrainerCard8(sav, GetBlock(ITrainerCard));
Played = new PlayTime8(sav, GetBlock(IPlayTime));
Fused = new Fused8(sav, GetBlock(IFused));
Daycare = new Daycare8(sav, GetBlock(IDaycare));

View File

@@ -51,6 +51,7 @@ public abstract class SAV8 : SaveFile, ISaveBlock8Main
public abstract Fused8 Fused { get; }
public abstract Daycare8 Daycare { get; }
public abstract Record8 Records { get; }
public abstract TrainerCard8 TrainerCard { get; }
#endregion
public override GameVersion Version

View File

@@ -62,6 +62,7 @@ public override void CopyChangesFrom(SaveFile sav)
public override Fused8 Fused => Blocks.Fused;
public override Daycare8 Daycare => Blocks.Daycare;
public override Record8 Records => Blocks.Records;
public override TrainerCard8 TrainerCard => Blocks.TrainerCard;
#endregion
public override SaveFile Clone() => new SAV8SWSH(BAK, AllBlocks.Select(z => z.Clone()).ToArray());