using static PKHeX.Core.LegalityCheckStrings;
namespace PKHeX.Core
{
/// Severity indication of the associated
///
/// Severity >= is green
/// Severity == is yellow
/// Severity <= is red
///
public enum Severity
{
///
/// Cannot determine validity; not valid.
///
Indeterminate = -2,
///
/// Definitively not valid.
///
Invalid = -1,
///
/// Suspicious values, but still valid.
///
Fishy = 0,
///
/// Values are valid.
///
Valid = 1,
}
public static partial class Extensions
{
///
/// Converts a Check result Severity determination (Valid/Invalid/etc) to the localized string.
///
/// value to convert to string.
/// Localized .
public static string Description(this Severity s)
{
return s switch
{
Severity.Indeterminate => L_SIndeterminate,
Severity.Invalid => L_SInvalid,
Severity.Fishy => L_SFishy,
Severity.Valid => L_SValid,
_ => L_SNotImplemented
};
}
}
}