2022-06-18 11:04:24 -07:00
|
|
|
|
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
|
2019-11-15 17:34:18 -08:00
|
|
|
|
{
|
2022-06-18 11:04:24 -07:00
|
|
|
|
private static readonly string[] RibbonSetNamesCommon8 =
|
2019-11-15 17:34:18 -08:00
|
|
|
|
{
|
2022-06-18 11:04:24 -07:00
|
|
|
|
nameof(IRibbonSetCommon8.RibbonChampionGalar), nameof(IRibbonSetCommon8.RibbonTowerMaster),
|
|
|
|
|
nameof(IRibbonSetCommon8.RibbonMasterRank),
|
|
|
|
|
nameof(IRibbonSetCommon8.RibbonTwinklingStar), nameof(IRibbonSetCommon8.RibbonPioneer),
|
|
|
|
|
};
|
2019-11-15 17:34:18 -08:00
|
|
|
|
|
2022-06-18 11:04:24 -07:00
|
|
|
|
internal static bool[] RibbonBits(this IRibbonSetCommon8 set)
|
2019-11-15 17:34:18 -08:00
|
|
|
|
{
|
2022-06-18 11:04:24 -07:00
|
|
|
|
return new[]
|
2019-11-15 17:34:18 -08:00
|
|
|
|
{
|
2022-06-18 11:04:24 -07:00
|
|
|
|
set.RibbonChampionGalar,
|
|
|
|
|
set.RibbonTowerMaster,
|
|
|
|
|
set.RibbonMasterRank,
|
|
|
|
|
set.RibbonTwinklingStar,
|
|
|
|
|
set.RibbonPioneer,
|
2019-11-15 17:34:18 -08:00
|
|
|
|
};
|
2022-06-18 11:04:24 -07:00
|
|
|
|
}
|
2019-11-15 17:34:18 -08:00
|
|
|
|
|
2022-06-18 11:04:24 -07:00
|
|
|
|
internal static string[] RibbonNames(this IRibbonSetCommon8 _) => RibbonSetNamesCommon8;
|
2022-05-30 21:43:52 -07:00
|
|
|
|
|
2022-06-18 11:04:24 -07:00
|
|
|
|
internal static void CopyRibbonSetCommon8(this IRibbonSetCommon8 set, IRibbonSetCommon8 dest)
|
|
|
|
|
{
|
|
|
|
|
dest.RibbonChampionGalar = set.RibbonChampionGalar;
|
|
|
|
|
dest.RibbonTowerMaster = set.RibbonTowerMaster;
|
|
|
|
|
dest.RibbonMasterRank = set.RibbonMasterRank;
|
|
|
|
|
dest.RibbonTwinklingStar = set.RibbonTwinklingStar;
|
|
|
|
|
dest.RibbonPioneer = set.RibbonPioneer;
|
2019-11-15 17:34:18 -08:00
|
|
|
|
}
|
2022-06-18 11:04:24 -07:00
|
|
|
|
}
|