mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-11 15:07:11 +00:00
Cap gen6 boxes unlocked at 30
Closes #975 Doesn't hide the 31st box from the editor, only prevents adding&selecting 31 from the dropdown for unlocked count.
This commit is contained in:
parent
121a821180
commit
e779498aae
1 changed files with 6 additions and 2 deletions
|
@ -68,9 +68,13 @@ namespace PKHeX.WinForms
|
||||||
if (SAV.BoxesUnlocked > 0)
|
if (SAV.BoxesUnlocked > 0)
|
||||||
{
|
{
|
||||||
CB_Unlocked.Items.Clear();
|
CB_Unlocked.Items.Clear();
|
||||||
for (int i = 0; i <= SAV.BoxCount; i++)
|
int max = SAV.BoxCount;
|
||||||
|
if (SAV.Generation == 6)
|
||||||
|
max -= 1; // cover legendary captured unlocks final box, not governed by BoxesUnlocked
|
||||||
|
|
||||||
|
for (int i = 0; i <= max; i++)
|
||||||
CB_Unlocked.Items.Add(i);
|
CB_Unlocked.Items.Add(i);
|
||||||
CB_Unlocked.SelectedIndex = Math.Min(SAV.BoxCount, SAV.BoxesUnlocked);
|
CB_Unlocked.SelectedIndex = Math.Min(max, SAV.BoxesUnlocked);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue