Add box sort by encounter type

grabs encounter name and orders by that (Egg/Static/Wild etc)
This commit is contained in:
Kurt 2019-02-18 15:34:55 -08:00
parent 7c3e5aa83c
commit 9171055fd4
3 changed files with 3 additions and 0 deletions

View file

@ -61,6 +61,7 @@ namespace PKHeX.Core
new BoxManipSort(BoxManipType.SortBST, list => list.OrderByCustom(pk => pk.PersonalInfo.BST)),
new BoxManipSort(BoxManipType.SortCP, list => list.OrderByCustom(pk => (pk as PB7)?.Stat_CP), s => s is SAV7b),
new BoxManipSort(BoxManipType.SortLegal, list => list.OrderByCustom(pk => !new LegalityAnalysis(pk).Valid)),
new BoxManipSort(BoxManipType.SortEncounterType, list => list.OrderByCustom(pk => new LegalityAnalysis(pk).Info?.EncounterMatch.GetEncounterTypeName())),
};
}
}

View file

@ -30,6 +30,7 @@ namespace PKHeX.Core
SortBST,
SortCP,
SortLegal,
SortEncounterType,
ModifyHatchEggs,
ModifyMaxFriendship,

View file

@ -70,6 +70,7 @@ namespace PKHeX.WinForms.Controls
[BoxManipType.SortBST] = Resources.vallohi,
[BoxManipType.SortCP] = Resources.vallohi,
[BoxManipType.SortLegal] = Resources.export,
[BoxManipType.SortEncounterType] = Resources.about,
[BoxManipType.ModifyHatchEggs] = Resources.about,
[BoxManipType.ModifyMaxFriendship] = Resources.heart,