mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 06:26:40 -05:00
SAV5: expose number of unlocked boxes
This commit is contained in:
@@ -95,6 +95,7 @@ public override int PartyCount
|
||||
public override int GetPartyOffset(int slot) => Party + 8 + (SIZE_PARTY * slot);
|
||||
|
||||
protected override int GetBoxWallpaperOffset(int box) => BoxLayout.GetBoxWallpaperOffset(box);
|
||||
public override int BoxesUnlocked { get => BoxLayout.BoxesUnlocked; set => BoxLayout.BoxesUnlocked = (byte)value; }
|
||||
public override int GetBoxWallpaper(int box) => BoxLayout.GetBoxWallpaper(box);
|
||||
public override void SetBoxWallpaper(int box, int value) => BoxLayout.SetBoxWallpaper(box, value);
|
||||
public override string GetBoxName(int box) => BoxLayout[box];
|
||||
|
||||
@@ -39,6 +39,17 @@ public void SetBoxName(int box, ReadOnlySpan<char> value)
|
||||
SAV.SetString(GetBoxNameSpan(box), value, 13, StringConverterOption.ClearZero);
|
||||
}
|
||||
|
||||
public byte BoxesUnlocked
|
||||
{
|
||||
get => Data[Offset + 0x3DD];
|
||||
set
|
||||
{
|
||||
if (value > SAV.BoxCount)
|
||||
value = (byte)SAV.BoxCount;
|
||||
Data[Offset + 0x3DD] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string this[int i]
|
||||
{
|
||||
get => GetBoxName(i);
|
||||
|
||||
Reference in New Issue
Block a user