mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
147b676d8c
disable GeneratePKMs from throwing an exception (it's a testing flag, not to leak out if someone wants a debug dll I guess) expose FixedGenderFromBiGender expose ribbon interfaces
39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
namespace PKHeX.Core
|
|
{
|
|
/// <summary> Ribbons introduced in Generation 3 for Special Events </summary>
|
|
public interface IRibbonSetEvent3
|
|
{
|
|
bool RibbonEarth { get; set; }
|
|
bool RibbonNational { get; set; }
|
|
bool RibbonCountry { get; set; }
|
|
bool RibbonChampionBattle { get; set; }
|
|
bool RibbonChampionRegional { get; set; }
|
|
bool RibbonChampionNational { get; set; }
|
|
}
|
|
|
|
internal static partial class RibbonExtensions
|
|
{
|
|
private static readonly string[] RibbonSetNamesEvent3 =
|
|
{
|
|
nameof(IRibbonSetEvent3.RibbonEarth), nameof(IRibbonSetEvent3.RibbonNational), nameof(IRibbonSetEvent3.RibbonCountry),
|
|
nameof(IRibbonSetEvent3.RibbonChampionBattle), nameof(IRibbonSetEvent3.RibbonChampionRegional), nameof(IRibbonSetEvent3.RibbonChampionNational)
|
|
};
|
|
|
|
internal static bool[] RibbonBits(this IRibbonSetEvent3 set)
|
|
{
|
|
if (set == null)
|
|
return new bool[6];
|
|
return new[]
|
|
{
|
|
set.RibbonEarth,
|
|
set.RibbonNational,
|
|
set.RibbonCountry,
|
|
set.RibbonChampionBattle,
|
|
set.RibbonChampionRegional,
|
|
set.RibbonChampionNational,
|
|
};
|
|
}
|
|
|
|
internal static string[] RibbonNames(this IRibbonSetEvent3 _) => RibbonSetNamesEvent3;
|
|
}
|
|
}
|