mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add missing generation to accessor type name
Now matches Interface declaration style (iAccessorGenGame), and is consistently named with the other accessors already using the same naming style plus they are now ordered in the file tree :) no functional change
This commit is contained in:
parent
fb02295c70
commit
46156b48c6
11 changed files with 36 additions and 36 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
public class SaveBlockAccessorAO : ISaveBlockAccessor<BlockInfo6>, ISaveBlock6Main
|
||||
public class SaveBlockAccessor6AO : ISaveBlockAccessor<BlockInfo6>, ISaveBlock6Main
|
||||
{
|
||||
public const int boAO = SaveUtil.SIZE_G6ORAS - 0x200;
|
||||
|
||||
|
@ -90,7 +90,7 @@ namespace PKHeX.Core
|
|||
public MaisonBlock Maison { get; }
|
||||
public SubEventLog6 SUBE { get; }
|
||||
|
||||
public SaveBlockAccessorAO(SAV6AO sav)
|
||||
public SaveBlockAccessor6AO(SAV6AO sav)
|
||||
{
|
||||
Puff = new Puff6(sav, 0x0000);
|
||||
Items = new MyItem6AO(sav, 0x00400);
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
public class SaveBlockAccessorAODemo : ISaveBlockAccessor<BlockInfo6>, ISaveBlock6Core
|
||||
public class SaveBlockAccessor6AODemo : ISaveBlockAccessor<BlockInfo6>, ISaveBlock6Core
|
||||
{
|
||||
public const int boAOdemo = SaveUtil.SIZE_G6ORASDEMO - 0x200;
|
||||
|
||||
|
@ -36,7 +36,7 @@ namespace PKHeX.Core
|
|||
public RecordBlock6 Records { get; }
|
||||
public Misc6AO Misc { get; }
|
||||
|
||||
public SaveBlockAccessorAODemo(SAV6AODemo sav)
|
||||
public SaveBlockAccessor6AODemo(SAV6AODemo sav)
|
||||
{
|
||||
Items = new MyItem6AO(sav, 0x00000);
|
||||
ItemInfo = new ItemInfo6(sav, 0x00C00);
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
public class SaveBlockAccessorXY : ISaveBlockAccessor<BlockInfo6>, ISaveBlock6XY
|
||||
public class SaveBlockAccessor6XY : ISaveBlockAccessor<BlockInfo6>, ISaveBlock6XY
|
||||
{
|
||||
public const int boXY = SaveUtil.SIZE_G6XY - 0x200;
|
||||
|
||||
|
@ -75,7 +75,7 @@ namespace PKHeX.Core
|
|||
public RecordBlock6 Records { get; }
|
||||
public SubEventLog6 SUBE { get; }
|
||||
|
||||
public SaveBlockAccessorXY(SAV6XY sav)
|
||||
public SaveBlockAccessor6XY(SAV6XY sav)
|
||||
{
|
||||
Puff = new Puff6(sav, 0x00000);
|
||||
Items = new MyItem6XY(sav, 0x00400);
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace PKHeX.Core
|
||||
{
|
||||
public class SaveBlockAccessorSWSH : SCBlockAccessor, ISaveBlock8Main
|
||||
public class SaveBlockAccessor8SWSH : SCBlockAccessor, ISaveBlock8Main
|
||||
{
|
||||
public override IReadOnlyList<SCBlock> BlockInfo { get; }
|
||||
public Box8 BoxInfo { get; }
|
||||
|
@ -21,7 +21,7 @@ namespace PKHeX.Core
|
|||
public RaidSpawnList8 Raid { get; }
|
||||
public TitleScreen8 TitleScreen { get; }
|
||||
|
||||
public SaveBlockAccessorSWSH(SAV8SWSH sav)
|
||||
public SaveBlockAccessor8SWSH(SAV8SWSH sav)
|
||||
{
|
||||
BlockInfo = sav.AllBlocks;
|
||||
BoxInfo = new Box8(sav, GetBlock(KBox));
|
|
@ -11,22 +11,22 @@ namespace PKHeX.Core
|
|||
/// <inheritdoc cref="SAV6" />
|
||||
public sealed class SAV6AO : SAV6, ISaveBlock6AO
|
||||
{
|
||||
public SAV6AO(byte[] data) : base(data, SaveBlockAccessorAO.boAO)
|
||||
public SAV6AO(byte[] data) : base(data, SaveBlockAccessor6AO.boAO)
|
||||
{
|
||||
Blocks = new SaveBlockAccessorAO(this);
|
||||
Blocks = new SaveBlockAccessor6AO(this);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public SAV6AO() : base(SaveUtil.SIZE_G6ORAS, SaveBlockAccessorAO.boAO)
|
||||
public SAV6AO() : base(SaveUtil.SIZE_G6ORAS, SaveBlockAccessor6AO.boAO)
|
||||
{
|
||||
Blocks = new SaveBlockAccessorAO(this);
|
||||
Blocks = new SaveBlockAccessor6AO(this);
|
||||
Initialize();
|
||||
ClearBoxes();
|
||||
}
|
||||
|
||||
public override PersonalTable Personal => PersonalTable.AO;
|
||||
public override IReadOnlyList<ushort> HeldItems => Legal.HeldItem_AO;
|
||||
public SaveBlockAccessorAO Blocks { get; }
|
||||
public SaveBlockAccessor6AO Blocks { get; }
|
||||
public override SaveFile Clone() => new SAV6AO((byte[])Data.Clone());
|
||||
public override int MaxMoveID => Legal.MaxMoveID_6_AO;
|
||||
public override int MaxItemID => Legal.MaxItemID_6_AO;
|
||||
|
|
|
@ -8,15 +8,15 @@ namespace PKHeX.Core
|
|||
/// <inheritdoc cref="SAV6" />
|
||||
public sealed class SAV6AODemo : SAV6
|
||||
{
|
||||
public SAV6AODemo(byte[] data) : base(data, SaveBlockAccessorAODemo.boAOdemo)
|
||||
public SAV6AODemo(byte[] data) : base(data, SaveBlockAccessor6AODemo.boAOdemo)
|
||||
{
|
||||
Blocks = new SaveBlockAccessorAODemo(this);
|
||||
Blocks = new SaveBlockAccessor6AODemo(this);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public SAV6AODemo() : base(SaveUtil.SIZE_G6ORASDEMO, SaveBlockAccessorAODemo.boAOdemo)
|
||||
public SAV6AODemo() : base(SaveUtil.SIZE_G6ORASDEMO, SaveBlockAccessor6AODemo.boAOdemo)
|
||||
{
|
||||
Blocks = new SaveBlockAccessorAODemo(this);
|
||||
Blocks = new SaveBlockAccessor6AODemo(this);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace PKHeX.Core
|
|||
public override int MaxMoveID => Legal.MaxMoveID_6_AO;
|
||||
public override int MaxItemID => Legal.MaxItemID_6_AO;
|
||||
public override int MaxAbilityID => Legal.MaxAbilityID_6_AO;
|
||||
public SaveBlockAccessorAODemo Blocks { get; }
|
||||
public SaveBlockAccessor6AODemo Blocks { get; }
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
|
|
|
@ -11,22 +11,22 @@ namespace PKHeX.Core
|
|||
/// <inheritdoc cref="SAV6" />
|
||||
public sealed class SAV6XY : SAV6, ISaveBlock6XY
|
||||
{
|
||||
public SAV6XY(byte[] data) : base(data, SaveBlockAccessorXY.boXY)
|
||||
public SAV6XY(byte[] data) : base(data, SaveBlockAccessor6XY.boXY)
|
||||
{
|
||||
Blocks = new SaveBlockAccessorXY(this);
|
||||
Blocks = new SaveBlockAccessor6XY(this);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public SAV6XY() : base(SaveUtil.SIZE_G6XY, SaveBlockAccessorXY.boXY)
|
||||
public SAV6XY() : base(SaveUtil.SIZE_G6XY, SaveBlockAccessor6XY.boXY)
|
||||
{
|
||||
Blocks = new SaveBlockAccessorXY(this);
|
||||
Blocks = new SaveBlockAccessor6XY(this);
|
||||
Initialize();
|
||||
ClearBoxes();
|
||||
}
|
||||
|
||||
public override PersonalTable Personal => PersonalTable.XY;
|
||||
public override IReadOnlyList<ushort> HeldItems => Legal.HeldItem_XY;
|
||||
public SaveBlockAccessorXY Blocks { get; }
|
||||
public SaveBlockAccessor6XY Blocks { get; }
|
||||
public override SaveFile Clone() => new SAV6XY((byte[])Data.Clone());
|
||||
public override int MaxMoveID => Legal.MaxMoveID_6_XY;
|
||||
public override int MaxItemID => Legal.MaxItemID_6_XY;
|
||||
|
|
|
@ -17,14 +17,14 @@ namespace PKHeX.Core
|
|||
{
|
||||
Data = Array.Empty<byte>();
|
||||
AllBlocks = blocks;
|
||||
Blocks = new SaveBlockAccessorSWSH(this);
|
||||
Blocks = new SaveBlockAccessor8SWSH(this);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public SAV8SWSH()
|
||||
{
|
||||
AllBlocks = Meta8.GetBlankDataSWSH();
|
||||
Blocks = new SaveBlockAccessorSWSH(this);
|
||||
Blocks = new SaveBlockAccessor8SWSH(this);
|
||||
Initialize();
|
||||
ClearBoxes();
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ namespace PKHeX.Core
|
|||
public override IReadOnlyList<ushort> HeldItems => Legal.HeldItems_SWSH;
|
||||
|
||||
#region Blocks
|
||||
public SaveBlockAccessorSWSH Blocks { get; }
|
||||
public SaveBlockAccessor8SWSH Blocks { get; }
|
||||
public override Box8 BoxInfo => Blocks.BoxInfo;
|
||||
public override Party8 PartyInfo => Blocks.PartyInfo;
|
||||
public override MyItem Items => Blocks.Items;
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace PKHeX.Core
|
|||
set
|
||||
{
|
||||
Data[Offset + 0xA7] = (byte) value;
|
||||
((SAV8SWSH)SAV).SetValue(SaveBlockAccessorSWSH.KGameLanguage, (uint)value);
|
||||
((SAV8SWSH)SAV).SetValue(SaveBlockAccessor8SWSH.KGameLanguage, (uint)value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace PKHeX.Core
|
|||
var data = BitConverter.GetBytes(value);
|
||||
SAV.SetData(Data, data, 0x28);
|
||||
// set to the other block since it doesn't have an accessor
|
||||
((SAV8SWSH)SAV).SetValue(SaveBlockAccessorSWSH.KRotoRally, (uint)value);
|
||||
((SAV8SWSH)SAV).SetValue(SaveBlockAccessor8SWSH.KRotoRally, (uint)value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,20 +107,20 @@ namespace PKHeX.WinForms
|
|||
|
||||
private void GetMiscValues()
|
||||
{
|
||||
MT_BattleTowerSinglesWin.Text = SAV.GetValue(SaveBlockAccessorSWSH.KBattleTowerSinglesVictory).ToString();
|
||||
MT_BattleTowerDoublesWin.Text = SAV.GetValue(SaveBlockAccessorSWSH.KBattleTowerDoublesVictory).ToString();
|
||||
MT_BattleTowerSinglesStreak.Text = SAV.GetValue(SaveBlockAccessorSWSH.KBattleTowerSinglesStreak).ToString();
|
||||
MT_BattleTowerDoublesStreak.Text = SAV.GetValue(SaveBlockAccessorSWSH.KBattleTowerDoublesStreak).ToString();
|
||||
MT_BattleTowerSinglesWin.Text = SAV.GetValue(SaveBlockAccessor8SWSH.KBattleTowerSinglesVictory).ToString();
|
||||
MT_BattleTowerDoublesWin.Text = SAV.GetValue(SaveBlockAccessor8SWSH.KBattleTowerDoublesVictory).ToString();
|
||||
MT_BattleTowerSinglesStreak.Text = SAV.GetValue(SaveBlockAccessor8SWSH.KBattleTowerSinglesStreak).ToString();
|
||||
MT_BattleTowerDoublesStreak.Text = SAV.GetValue(SaveBlockAccessor8SWSH.KBattleTowerDoublesStreak).ToString();
|
||||
}
|
||||
|
||||
private void SaveMiscValues()
|
||||
{
|
||||
var singles = Math.Min(9_999_999u, Util.ToUInt32(MT_BattleTowerSinglesWin.Text));
|
||||
var doubles = Math.Min(9_999_999u, Util.ToUInt32(MT_BattleTowerDoublesWin.Text));
|
||||
SAV.SetValue(SaveBlockAccessorSWSH.KBattleTowerSinglesVictory, singles);
|
||||
SAV.SetValue(SaveBlockAccessorSWSH.KBattleTowerDoublesVictory, doubles);
|
||||
SAV.SetValue(SaveBlockAccessorSWSH.KBattleTowerSinglesStreak, (ushort)Math.Min(300, Util.ToUInt32(MT_BattleTowerSinglesStreak.Text)));
|
||||
SAV.SetValue(SaveBlockAccessorSWSH.KBattleTowerDoublesStreak, (ushort)Math.Min(300, Util.ToUInt32(MT_BattleTowerDoublesStreak.Text)));
|
||||
SAV.SetValue(SaveBlockAccessor8SWSH.KBattleTowerSinglesVictory, singles);
|
||||
SAV.SetValue(SaveBlockAccessor8SWSH.KBattleTowerDoublesVictory, doubles);
|
||||
SAV.SetValue(SaveBlockAccessor8SWSH.KBattleTowerSinglesStreak, (ushort)Math.Min(300, Util.ToUInt32(MT_BattleTowerSinglesStreak.Text)));
|
||||
SAV.SetValue(SaveBlockAccessor8SWSH.KBattleTowerDoublesStreak, (ushort)Math.Min(300, Util.ToUInt32(MT_BattleTowerDoublesStreak.Text)));
|
||||
|
||||
SAV.SetRecord(Records.G8BattleTowerSingleWin, (int)singles);
|
||||
SAV.SetRecord(Records.G8BattleTowerDoubleWin, (int)doubles);
|
||||
|
|
Loading…
Reference in a new issue