mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 04:23:12 +00:00
parent
37b3e58979
commit
08adb4c2cb
3 changed files with 18 additions and 9 deletions
|
@ -155,7 +155,6 @@
|
|||
// CHK_SecretComplete
|
||||
//
|
||||
this.CHK_SecretComplete.AutoSize = true;
|
||||
this.CHK_SecretComplete.Enabled = false;
|
||||
this.CHK_SecretComplete.Location = new System.Drawing.Point(3, 17);
|
||||
this.CHK_SecretComplete.Name = "CHK_SecretComplete";
|
||||
this.CHK_SecretComplete.Size = new System.Drawing.Size(145, 17);
|
||||
|
|
|
@ -27,8 +27,6 @@ namespace PKHeX.WinForms
|
|||
|
||||
CHK_SecretUnlocked.Checked = pkm.SecretSuperTrainingUnlocked;
|
||||
CHK_SecretComplete.Checked = pkm.SecretSuperTrainingComplete;
|
||||
if (!CHK_SecretUnlocked.Checked) // force update to disable checkboxes
|
||||
CHK_Secret_CheckedChanged(null, null);
|
||||
|
||||
if (pkm is PK6)
|
||||
{
|
||||
|
@ -40,10 +38,14 @@ namespace PKHeX.WinForms
|
|||
PK6 pk6 = (PK6) pkm;
|
||||
CB_Bag.SelectedIndex = pk6.TrainingBag;
|
||||
NUD_BagHits.Value = pk6.TrainingBagHits;
|
||||
|
||||
if (!CHK_SecretUnlocked.Checked) // force update to disable checkboxes
|
||||
CHK_Secret_CheckedChanged(null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
L_Bag.Visible = CB_Bag.Visible = L_Hits.Visible = NUD_BagHits.Visible = false;
|
||||
CHK_SecretUnlocked.Visible = CHK_SecretComplete.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,16 +141,22 @@ namespace PKHeX.WinForms
|
|||
if (CHK_SecretUnlocked.Checked) // only give dist if Secret is Unlocked (None -> All -> All*)
|
||||
foreach (var c in TLP_DistSuperTrain.Controls.OfType<CheckBox>())
|
||||
c.Checked = true;
|
||||
|
||||
CHK_SecretUnlocked.Checked = true;
|
||||
CHK_SecretComplete.Checked = true;
|
||||
|
||||
if (pkm is PK6)
|
||||
{
|
||||
CHK_SecretUnlocked.Checked = true;
|
||||
CHK_SecretComplete.Checked = true;
|
||||
}
|
||||
foreach (var c in TLP_SuperTrain.Controls.OfType<CheckBox>())
|
||||
c.Checked = true;
|
||||
}
|
||||
private void B_None_Click(object sender, EventArgs e)
|
||||
{
|
||||
CHK_SecretUnlocked.Checked = false;
|
||||
CHK_SecretComplete.Checked = false;
|
||||
if (pkm is PK6)
|
||||
{
|
||||
CHK_SecretUnlocked.Checked = false;
|
||||
CHK_SecretComplete.Checked = false;
|
||||
}
|
||||
foreach (var c in TLP_SuperTrain.Controls.OfType<CheckBox>())
|
||||
c.Checked = false;
|
||||
foreach (var c in TLP_DistSuperTrain.Controls.OfType<CheckBox>())
|
||||
|
@ -156,6 +164,8 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
private void CHK_Secret_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!(pkm is PK6))
|
||||
return;
|
||||
CHK_SecretComplete.Checked &= CHK_SecretUnlocked.Checked;
|
||||
CHK_SecretComplete.Enabled = CHK_SecretUnlocked.Checked;
|
||||
foreach (var c in TLP_SuperTrain.Controls.OfType<CheckBox>().Where(chk => Convert.ToInt16(chk.Name[14]+"") >= 4))
|
||||
|
|
|
@ -517,7 +517,7 @@ namespace PKHeX.Core
|
|||
if (pkm.IsEgg && TrainCount > 0)
|
||||
{ AddLine(Severity.Invalid, "Super Training missions on Egg.", CheckIdentifier.Training); }
|
||||
else if (TrainCount > 0 && pkm.GenNumber != 6)
|
||||
{ AddLine(Severity.Invalid, "Distribution Super Training missions are not available in game.", CheckIdentifier.Training); }
|
||||
{ AddLine(Severity.Invalid, "Super Training missions are not available in game.", CheckIdentifier.Training); }
|
||||
else
|
||||
{
|
||||
if (pkm.Format >= 7)
|
||||
|
|
Loading…
Reference in a new issue