PKHeX/PKHeX.Core/Ribbons/IRibbonSetCommon8.cs
Kurt 723514e89c
Update 21.11.19 - Brilliant Diamond & Shining Pearl (#3289)
Big thanks to @SciresM @sora10pls @Lusamine @architdate @ReignOfComputer for testing and contributing code / test cases. Can't add co-authors from the PR menu :(

Builds will fail because azure pipelines not yet updated with net6.
2021-11-19 18:23:49 -08:00

36 lines
No EOL
1.2 KiB
C#

namespace PKHeX.Core
{
/// <summary> Common Ribbons introduced in Generation 8 </summary>
public interface IRibbonSetCommon8
{
bool RibbonChampionGalar { get; set; }
bool RibbonTowerMaster { get; set; }
bool RibbonMasterRank { get; set; }
bool RibbonTwinklingStar { get; set; }
bool RibbonPioneer { get; set; }
}
internal static partial class RibbonExtensions
{
private static readonly string[] RibbonSetNamesCommon8 =
{
nameof(IRibbonSetCommon8.RibbonChampionGalar), nameof(IRibbonSetCommon8.RibbonTowerMaster),
nameof(IRibbonSetCommon8.RibbonMasterRank),
nameof(IRibbonSetCommon8.RibbonTwinklingStar), nameof(IRibbonSetCommon8.RibbonPioneer),
};
internal static bool[] RibbonBits(this IRibbonSetCommon8 set)
{
return new[]
{
set.RibbonChampionGalar,
set.RibbonTowerMaster,
set.RibbonMasterRank,
set.RibbonTwinklingStar,
set.RibbonPioneer,
};
}
internal static string[] RibbonNames(this IRibbonSetCommon8 _) => RibbonSetNamesCommon8;
}
}