From 07690e2919fa5b36a151cf6710aa4de834b04ab4 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 5 Aug 2017 20:30:33 -0700 Subject: [PATCH] Unhide language for gen1/2 saves Closes #1349 Add egg memory wiping when ticking as egg, Add egg memory setting when suggesting encounter info. Closes #1350 I'd rather have it this way as to not do cross-tab auto edits that the user may miss. --- PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index a6814255c..c6232a023 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -800,6 +800,15 @@ private bool SetSuggestedMetLocation(bool silent = false) { TB_MetLevel.Text = level.ToString(); CB_MetLocation.SelectedValue = location; + + if (pkm.GenNumber == 6 && pkm.WasEgg && ModifyPKM) + { + pkm.OT_Memory = 2; + pkm.OT_Affection = 0; + pkm.OT_Feeling = Util.Rand.Next(0, 9); + pkm.OT_Intensity = 1; + pkm.OT_TextVar = pkm.XY ? 43 : 27; // riverside road : battling spot + } } if (pkm.CurrentLevel < minlvl) @@ -1489,6 +1498,11 @@ private void UpdateIsEgg(object sender, EventArgs e) if (pkm.Format != 4) // eggs in gen4 do not have nickname flag CHK_Nicknamed.Checked = true; } + + // Wipe egg memories + if (pkm.Format >= 6 && ModifyPKM) + pkm.OT_Memory = pkm.OT_Affection = pkm.OT_Feeling = pkm.OT_Intensity = pkm.OT_TextVar = + pkm.HT_Memory = pkm.HT_Affection = pkm.HT_Feeling = pkm.HT_Intensity = pkm.HT_TextVar = 0; } else // Not Egg { @@ -1796,7 +1810,7 @@ private void ToggleInterface(int gen) CB_Ability.Visible = !DEV_Ability.Enabled && gen >= 3; FLP_Nature.Visible = gen >= 3; FLP_Ability.Visible = gen >= 3; - FLP_Language.Visible = gen >= 3; + // FLP_Language.Visible = gen >= 3; // not directly used by gen1/2, useful for providing species names for another language GB_ExtraBytes.Visible = GB_ExtraBytes.Enabled = gen >= 3; GB_Markings.Visible = gen >= 3; BTN_Ribbons.Visible = gen >= 3;