Add boxes unlocked & secret box toggle

ty @sora10pls
use box layout editor to change values (0-32 and toggle the flag)
This commit is contained in:
Kurt 2021-03-02 21:28:53 -08:00
parent 08ecac8cb3
commit 2826049e32
2 changed files with 14 additions and 0 deletions

View file

@ -131,6 +131,8 @@ namespace PKHeX.Core
// Values
public const uint KCurrentBox = 0x017C3CBB; // U32 Box Index
public const uint KBoxesUnlocked = 0x71825204; // U32
public const uint KSecretBoxUnlocked = 0x32A339E9; // bool
public const uint KGameLanguage = 0x0BFDEBA1; // U32 Game Language
public const uint KRepel = 0x9ec079da; // U16 Repel Steps remaining
public const uint KRotoRally = 0x38548020; // U32 Roto Rally Score (99,999 cap)

View file

@ -160,6 +160,18 @@ namespace PKHeX.Core
}
public override int CurrentBox { get => BoxLayout.CurrentBox; set => BoxLayout.CurrentBox = value; }
public override int BoxesUnlocked { get => (byte)Blocks.GetBlockValue(SaveBlockAccessor8SWSH.KBoxesUnlocked); set => Blocks.SetBlockValue(SaveBlockAccessor8SWSH.KBoxesUnlocked, (byte)value); }
public override byte[] BoxFlags
{
get => new [] {Convert.ToByte(Blocks.GetBlock(SaveBlockAccessor8SWSH.KSecretBoxUnlocked).Type - 1)};
set
{
if (value.Length != 1)
return;
Blocks.GetBlock(SaveBlockAccessor8SWSH.KSecretBoxUnlocked).Type = (SCTypeCode)(value[0] & 1) + 1;
}
}
public override bool HasBoxWallpapers => true;
public override bool HasNamableBoxes => true;