mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-09 10:56:04 -05:00
* Update to .NET 10 * Property fields * API signature updates * Extension method blocks * Completed dark mode support Outside of my control: - vertical tab control (pkm editor) - datetimepicker controls - lgpe event flags (no idea) - some control types having white-borders when they should really be gray Box background is 50% transparency to effectively darken the image. * Custom legality report popup * Event diff dialog, version select dialog * Add quick overwrite popup for export sav * Extension methods * Dark Mode: glow currently editing sprite * Add invalid encounter hint for trade evolutions * Extension properties * Append legality hint on hover card * Slot image loading: clear the screen-reader description if a slot is empty/invalid, rather than retain the previous description. Changing boxes would easily confuse users on this.
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Option for checking how a move may be learned.
|
|
/// </summary>
|
|
public enum LearnOption
|
|
{
|
|
/// <summary>
|
|
/// Checks with rules assuming the move is in the current moveset.
|
|
/// </summary>
|
|
Current,
|
|
|
|
/// <summary>
|
|
/// Checks with rules assuming the move was known at any time while existing inside the game source it is being checked in.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Only relevant for memory checks.
|
|
/// For not-transferable moves like Gen4/5 HM moves, no -- there's no point in checking them as they aren't requisites for anything.
|
|
/// Evolution criteria is handled separately.
|
|
/// </remarks>
|
|
AtAnyTime,
|
|
|
|
/// <summary>
|
|
/// Checks with rules assuming the move was taught via HOME -- for sharing acquired movesets between games.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Relevant for HOME sharing sanity checks.
|
|
/// Required to be distinct in that the rules are different from the other two options. TR/TM flags aren't required if the move was learned via HOME.
|
|
/// </remarks>
|
|
HOME,
|
|
}
|
|
|
|
public static class LearnOptionExtensions
|
|
{
|
|
extension(LearnOption option)
|
|
{
|
|
public bool IsCurrent() => option == LearnOption.Current;
|
|
public bool IsPast() => option is LearnOption.AtAnyTime or LearnOption.HOME;
|
|
public bool IsFlagCheckRequired() => option != LearnOption.HOME;
|
|
}
|
|
}
|