mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-08 11:07:31 -05:00
Indicate teamlocks in boxes
This commit is contained in:
@@ -83,8 +83,10 @@ private void Initialize()
|
||||
Box = 0x14EF4;
|
||||
Party = PartyInfo.Offset;
|
||||
PokeDex = Zukan.PokeDex;
|
||||
BoxLayout.LoadBattleTeams();
|
||||
DaycareOffset = Daycare.Offset;
|
||||
|
||||
ReloadBattleTeams();
|
||||
TeamSlots = BoxLayout.TeamSlots;
|
||||
}
|
||||
|
||||
public override bool HasEvents => true;
|
||||
@@ -143,6 +145,19 @@ protected void ReloadBattleTeams()
|
||||
BoxLayout.LoadBattleTeams();
|
||||
}
|
||||
|
||||
public override StorageSlotFlag GetSlotFlags(int index)
|
||||
{
|
||||
int team = Array.IndexOf(TeamSlots, index);
|
||||
if (team < 0)
|
||||
return StorageSlotFlag.None;
|
||||
|
||||
team /= 6;
|
||||
var val = (StorageSlotFlag)((int)StorageSlotFlag.BattleTeam1 << team);
|
||||
if (BoxLayout.GetIsTeamLocked(team))
|
||||
val |= StorageSlotFlag.Locked;
|
||||
return val;
|
||||
}
|
||||
|
||||
#region Checksums
|
||||
|
||||
private const int HashOffset = SaveUtil.SIZE_G8BDSP - 0x10;
|
||||
|
||||
@@ -98,6 +98,7 @@ public void SaveBattleTeams()
|
||||
}
|
||||
}
|
||||
|
||||
// bitflags
|
||||
public byte LockedTeam
|
||||
{
|
||||
get => Data[Offset + 0x61C];
|
||||
@@ -126,6 +127,8 @@ public byte CurrentBox
|
||||
set => Data[Offset + 0x61E] = value;
|
||||
}
|
||||
|
||||
public bool GetIsTeamLocked(int team) => (LockedTeam & (1 << team)) != 0;
|
||||
|
||||
public int GetBoxWallpaperOffset(int box) => Offset + 0x620 + box;
|
||||
|
||||
public int GetBoxWallpaper(int box)
|
||||
|
||||
Reference in New Issue
Block a user