Skip to content

Commit

Permalink
Add accessor for TrainerCard block
Browse files Browse the repository at this point in the history
  • Loading branch information
kwsch committed Nov 19, 2019
1 parent adf3340 commit 86796cd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions PKHeX.Core/Saves/Access/ISaveBlock8Main.cs
Expand Up @@ -13,5 +13,6 @@ public interface ISaveBlock8Main
Fused8 Fused { get; }
Daycare8 Daycare { get; }
Record8 Records { get; }
TrainerCard8 TrainerCard { get; }
}
}
6 changes: 2 additions & 4 deletions PKHeX.Core/Saves/Access/SaveBlockAccessorSWSH.cs
Expand Up @@ -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; }
Expand All @@ -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)
{
Expand All @@ -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));
Expand Down
1 change: 1 addition & 0 deletions PKHeX.Core/Saves/SAV8.cs
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions PKHeX.Core/Saves/SAV8SWSH.cs
Expand Up @@ -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());
Expand Down

0 comments on commit 86796cd

Please sign in to comment.