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
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
namespace PKHeX.Core
|
|
{
|
|
/// <summary> Common Ribbons introduced in Generation 7 </summary>
|
|
public interface IRibbonSetCommon7
|
|
{
|
|
bool RibbonChampionAlola { get; set; }
|
|
bool RibbonBattleRoyale { get; set; }
|
|
bool RibbonBattleTreeGreat { get; set; }
|
|
bool RibbonBattleTreeMaster { get; set; }
|
|
}
|
|
|
|
internal static partial class RibbonExtensions
|
|
{
|
|
private static readonly string[] RibbonSetNamesCommon7 =
|
|
{
|
|
nameof(IRibbonSetCommon7.RibbonChampionAlola), nameof(IRibbonSetCommon7.RibbonBattleRoyale),
|
|
nameof(IRibbonSetCommon7.RibbonBattleTreeGreat), nameof(IRibbonSetCommon7.RibbonBattleTreeMaster)
|
|
};
|
|
|
|
internal static bool[] RibbonBits(this IRibbonSetCommon7 set)
|
|
{
|
|
if (set == null)
|
|
return new bool[4];
|
|
return new[]
|
|
{
|
|
set.RibbonChampionAlola,
|
|
set.RibbonBattleRoyale,
|
|
set.RibbonBattleTreeGreat,
|
|
set.RibbonBattleTreeMaster,
|
|
};
|
|
}
|
|
|
|
internal static string[] RibbonNames(this IRibbonSetCommon7 _) => RibbonSetNamesCommon7;
|
|
}
|
|
}
|