From 8dcee4e0ee9db0dffcd5aca2030b34328422d1c3 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 30 Apr 2018 21:20:28 -0700 Subject: [PATCH] Add 3 more advanced sorters Primary->Secondary typing Generation->Version Base Stat Total --- PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs | 2 +- PKHeX.WinForms/Controls/SAV Editor/Sorter.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index 7383a8354..47cd33980 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -1610,7 +1610,7 @@ public void TemplateFields(PKM template) CB_Move1.SelectedValue = 1; var info = new SimpleTrainerInfo{Language = Math.Max(0, WinFormsUtil.GetIndex(CB_Language))}; if (info.Language == 0) - info.Language = 2; + info.Language = (int)LanguageID.English; SetDetailsOT(info); CB_Ball.SelectedIndex = Math.Min(0, CB_Ball.Items.Count - 1); diff --git a/PKHeX.WinForms/Controls/SAV Editor/Sorter.cs b/PKHeX.WinForms/Controls/SAV Editor/Sorter.cs index 02b56b8ca..f43259d0c 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/Sorter.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/Sorter.cs @@ -46,6 +46,9 @@ Image GetImage(Level l) AddItem(Level.SortBoxAdvanced, GetItem("Usage", "Usage", () => Sort(PKMSorting.OrderByUsage), Resources.heart)); AddItem(Level.SortBoxAdvanced, GetItem("Training", "Training", () => Sort(list => list.OrderByCustom(pk => pk.MaxEV * 6 - pk.EVTotal)), Resources.showdown)); AddItem(Level.SortBoxAdvanced, GetItem("Owner", "Ownership", () => Sort(list => list.OrderByOwnership(sav.SAV)), Resources.users)); + AddItem(Level.SortBoxAdvanced, GetItem("Type", "Type", () => Sort(list => list.OrderByCustom(pk => pk.PersonalInfo.Type1, pk => pk.PersonalInfo.Type2)), Resources.main)); + AddItem(Level.SortBoxAdvanced, GetItem("Version", "Version", () => Sort(list => list.OrderByCustom(pk => pk.GenNumber, pk => pk.Version)), Resources.numlohi)); + AddItem(Level.SortBoxAdvanced, GetItem("BST", "BST", () => Sort(list => list.OrderByCustom(pk => pk.PersonalInfo.BST)), Resources.vallohi)); AddItem(Level.SortBoxAdvanced, GetItem("Legal", "Legal", () => Sort(list => list.OrderByCustom(pk => !new LegalityAnalysis(pk).Valid)), Resources.export)); AddItem(Level.Modify, GetItem("HatchEggs", "Hatch Eggs", () => Modify(z => z.ForceHatchPKM()), Resources.about));