mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Misc tweaks
fix pcd detection (yield brewk needed to be inside brackets remove brackets from single line lambda expressions
This commit is contained in:
parent
e8f9fd0098
commit
502093b8b2
8 changed files with 17 additions and 17 deletions
|
@ -903,12 +903,14 @@ namespace PKHeX.Core
|
|||
}
|
||||
private static IEnumerable<MysteryGift> GetMatchingPCD(PKM pkm, IEnumerable<MysteryGift> DB)
|
||||
{
|
||||
if (DB == null)
|
||||
if (DB == null || pkm.IsEgg && pkm.Format != 4) // transferred
|
||||
yield break;
|
||||
|
||||
if (IsRangerManaphy(pkm))
|
||||
{
|
||||
yield return new PGT { Data = { [0] = 7, [8] = 1 } };
|
||||
yield break;
|
||||
}
|
||||
|
||||
var validPCD = new List<MysteryGift>();
|
||||
var vs = GetValidPreEvolutions(pkm).ToArray();
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace PKHeX.WinForms.Controls
|
|||
pb.DragEnter += BoxSlot_DragEnter;
|
||||
pb.DragDrop += BoxSlot_DragDrop;
|
||||
pb.QueryContinueDrag += BoxSlot_QueryContinueDrag;
|
||||
pb.GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
pb.GiveFeedback += (sender, e) => e.UseDefaultCursors = false;
|
||||
pb.AllowDrop = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace PKHeX.WinForms.Controls
|
|||
|
||||
dcpkx1, dcpkx2, gtspkx, fusedpkx, subepkx1, subepkx2, subepkx3,
|
||||
};
|
||||
GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
GiveFeedback += (sender, e) => e.UseDefaultCursors = false;
|
||||
SAV = z.Result;
|
||||
Box.Setup(M = new SlotChangeManager(this));
|
||||
foreach (PictureBox pb in SupplementarySlots)
|
||||
|
@ -64,7 +64,7 @@ namespace PKHeX.WinForms.Controls
|
|||
pb.DragEnter += M.DragEnter;
|
||||
pb.DragDrop += BoxSlot_DragDrop;
|
||||
pb.QueryContinueDrag += M.QueryContinueDrag;
|
||||
pb.GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
pb.GiveFeedback += (sender, e) => e.UseDefaultCursors = false;
|
||||
pb.AllowDrop = true;
|
||||
}
|
||||
foreach (TabPage tab in tabBoxMulti.TabPages)
|
||||
|
|
|
@ -130,8 +130,8 @@ namespace PKHeX.WinForms
|
|||
C_SAV.PKME_Tabs = PKME_Tabs;
|
||||
C_SAV.Menu_Redo = Menu_Redo;
|
||||
C_SAV.Menu_Undo = Menu_Undo;
|
||||
dragout.GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
dragout.GiveFeedback += (sender, e) => e.UseDefaultCursors = false;
|
||||
GiveFeedback += (sender, e) => e.UseDefaultCursors = false;
|
||||
PKME_Tabs.EnableDragDrop(Main_DragEnter, Main_DragDrop);
|
||||
C_SAV.EnableDragDrop(Main_DragEnter, Main_DragDrop);
|
||||
|
||||
|
|
|
@ -72,18 +72,16 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
private void AddRibbonSprite(RibbonInfo rib)
|
||||
{
|
||||
PictureBox pb = new PictureBox { AutoSize = false, Size = new Size(40,40), BackgroundImageLayout = ImageLayout.Center, Visible = false, Name = PrefixPB + rib.Name };
|
||||
var img = PKMUtil.GetRibbonSprite(rib.Name);
|
||||
var name = rib.Name;
|
||||
PictureBox pb = new PictureBox { AutoSize = false, Size = new Size(40,40), BackgroundImageLayout = ImageLayout.Center, Visible = false, Name = PrefixPB + name };
|
||||
var img = PKMUtil.GetRibbonSprite(name);
|
||||
if (img != null)
|
||||
pb.BackgroundImage = (Bitmap)img;
|
||||
if (img == null)
|
||||
return;
|
||||
|
||||
pb.MouseEnter += (s, e) =>
|
||||
{
|
||||
tipName.SetToolTip(pb, RibbonStrings.GetName(rib.Name));
|
||||
};
|
||||
|
||||
var display = RibbonStrings.GetName(name);
|
||||
pb.MouseEnter += (s, e) => tipName.SetToolTip(pb, display);
|
||||
FLP_Ribbons.Controls.Add(pb);
|
||||
}
|
||||
private void AddRibbonChoice(RibbonInfo rib)
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace PKHeX.WinForms
|
|||
AutoSize = true,
|
||||
Padding = Padding.Empty,
|
||||
};
|
||||
chk.CheckedChanged += (sender, e) => { reg.CompletedRegimen = chk.Checked; };
|
||||
chk.CheckedChanged += (sender, e) => reg.CompletedRegimen = chk.Checked;
|
||||
chk.Checked = reg.CompletedRegimen;
|
||||
TLP.Controls.Add(chk, 0, row);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace PKHeX.WinForms
|
|||
CenterToParent();
|
||||
|
||||
AllowDrop = true;
|
||||
GiveFeedback += (sender, e) => { e.UseDefaultCursors = false; };
|
||||
GiveFeedback += (sender, e) => e.UseDefaultCursors = false;
|
||||
DragEnter += Main_DragEnter;
|
||||
DragDrop += (sender, e) =>
|
||||
{
|
||||
|
|
|
@ -176,7 +176,7 @@ namespace PKHeX.WinForms
|
|||
AutoSize = true
|
||||
};
|
||||
chk.CheckStateChanged += ToggleFlag;
|
||||
lbl.Click += (sender, e) => { chk.Checked ^= true; };
|
||||
lbl.Click += (sender, e) => chk.Checked ^= true;
|
||||
TLP_Flags.Controls.Add(chk, 0, i);
|
||||
TLP_Flags.Controls.Add(lbl, 1, i);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue