PKHeX/PKHeX.Core/Ribbons/IRibbonSetMark9.cs
Kurt 03182ebd3d Update 22.11.24
Adds support for Scarlet & Violet.

Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-11-24 17:42:17 -08:00

60 lines
2 KiB
C#

namespace PKHeX.Core;
/// <summary> Marks introduced in Generation 9 </summary>
public interface IRibbonSetMark9
{
bool RibbonMarkJumbo { get; set; }
bool RibbonMarkMini { get; set; }
bool RibbonMarkItemfinder { get; set; }
bool RibbonMarkPartner { get; set; }
bool RibbonMarkGourmand { get; set; }
bool RibbonMarkAlpha { get; set; }
bool RibbonMarkMightiest { get; set; }
bool RibbonMarkTitan { get; set; }
bool HasMark();
}
internal static partial class RibbonExtensions
{
private static readonly string[] RibbonSetNamesMark9 =
{
nameof(IRibbonSetMark9.RibbonMarkJumbo),
nameof(IRibbonSetMark9.RibbonMarkMini),
nameof(IRibbonSetMark9.RibbonMarkItemfinder),
nameof(IRibbonSetMark9.RibbonMarkPartner),
nameof(IRibbonSetMark9.RibbonMarkGourmand),
nameof(IRibbonSetMark9.RibbonMarkAlpha),
nameof(IRibbonSetMark9.RibbonMarkMightiest),
nameof(IRibbonSetMark9.RibbonMarkTitan),
};
internal static bool[] RibbonBits(this IRibbonSetMark9 set)
{
return new[]
{
set.RibbonMarkJumbo,
set.RibbonMarkMini,
set.RibbonMarkItemfinder,
set.RibbonMarkPartner,
set.RibbonMarkGourmand,
set.RibbonMarkAlpha,
set.RibbonMarkMightiest,
set.RibbonMarkTitan,
};
}
internal static string[] RibbonNames(this IRibbonSetMark9 _) => RibbonSetNamesMark9;
internal static void CopyRibbonSetMark9(this IRibbonSetMark9 set, IRibbonSetMark9 dest)
{
dest.RibbonMarkJumbo = set.RibbonMarkJumbo;
dest.RibbonMarkMini = set.RibbonMarkMini;
dest.RibbonMarkItemfinder = set.RibbonMarkItemfinder;
dest.RibbonMarkPartner = set.RibbonMarkPartner;
dest.RibbonMarkGourmand = set.RibbonMarkGourmand;
dest.RibbonMarkAlpha = set.RibbonMarkAlpha;
dest.RibbonMarkMightiest = set.RibbonMarkMightiest;
dest.RibbonMarkTitan = set.RibbonMarkTitan;
}
}