From 86796cd67afd7df25bbb73d292193475a5b287ec Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 18 Nov 2019 17:57:33 -0800 Subject: [PATCH] Add accessor for TrainerCard block --- PKHeX.Core/Saves/Access/ISaveBlock8Main.cs | 1 + PKHeX.Core/Saves/Access/SaveBlockAccessorSWSH.cs | 6 ++---- PKHeX.Core/Saves/SAV8.cs | 1 + PKHeX.Core/Saves/SAV8SWSH.cs | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PKHeX.Core/Saves/Access/ISaveBlock8Main.cs b/PKHeX.Core/Saves/Access/ISaveBlock8Main.cs index f7a8a9cbc..129ae59d2 100644 --- a/PKHeX.Core/Saves/Access/ISaveBlock8Main.cs +++ b/PKHeX.Core/Saves/Access/ISaveBlock8Main.cs @@ -13,5 +13,6 @@ public interface ISaveBlock8Main Fused8 Fused { get; } Daycare8 Daycare { get; } Record8 Records { get; } + TrainerCard8 TrainerCard { get; } } } \ No newline at end of file diff --git a/PKHeX.Core/Saves/Access/SaveBlockAccessorSWSH.cs b/PKHeX.Core/Saves/Access/SaveBlockAccessorSWSH.cs index 85236b6b1..7dcd132de 100644 --- a/PKHeX.Core/Saves/Access/SaveBlockAccessorSWSH.cs +++ b/PKHeX.Core/Saves/Access/SaveBlockAccessorSWSH.cs @@ -4,10 +4,6 @@ namespace PKHeX.Core { public class SaveBlockAccessorSWSH : ISaveBlockAccessor, ISaveBlock8Main { - private static readonly SCBlock[] BlockInfoSWSH = - { - }; - public IReadOnlyList BlockInfo { get; } public Box8 BoxInfo { get; } public Party8 PartyInfo { get; } @@ -20,6 +16,7 @@ public class SaveBlockAccessorSWSH : ISaveBlockAccessor, 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)); diff --git a/PKHeX.Core/Saves/SAV8.cs b/PKHeX.Core/Saves/SAV8.cs index b24b341c1..d9cd21817 100644 --- a/PKHeX.Core/Saves/SAV8.cs +++ b/PKHeX.Core/Saves/SAV8.cs @@ -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 diff --git a/PKHeX.Core/Saves/SAV8SWSH.cs b/PKHeX.Core/Saves/SAV8SWSH.cs index 65ea51ec0..f1a507676 100644 --- a/PKHeX.Core/Saves/SAV8SWSH.cs +++ b/PKHeX.Core/Saves/SAV8SWSH.cs @@ -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());