PKHeX/PKHeX.Core/Ribbons/IRibbonSetOnly3.cs
Kurt c5655166bf Add shared pk3/xk3/ck3 class
standard generation 3 pkm content & interactions
generic inter-converter (more efficient than reflection)

update conversion methods; specific format conversion is now in the
object's src file now.

may be worth doing for gen4 pk4<->bk4
2018-02-03 12:42:06 -08:00

45 lines
1.7 KiB
C#

namespace PKHeX.Core
{
/// <summary> Ribbons that originated in Generation 3 and were only present within that Generation. </summary>
internal interface IRibbonSetOnly3
{
int RibbonCountG3Cool { get; set; }
int RibbonCountG3Beauty { get; set; }
int RibbonCountG3Cute { get; set; }
int RibbonCountG3Smart { get; set; }
int RibbonCountG3Tough { get; set; }
bool RibbonWorld { get; set; }
bool Unused1 { get; set; }
bool Unused2 { get; set; }
bool Unused3 { get; set; }
bool Unused4 { get; set; }
}
internal static partial class RibbonExtensions
{
private static readonly string[] RibbonSetNamesOnly3 =
{
nameof(IRibbonSetOnly3.RibbonCountG3Cool), nameof(IRibbonSetOnly3.RibbonCountG3Beauty), nameof(IRibbonSetOnly3.RibbonCountG3Cute),
nameof(IRibbonSetOnly3.RibbonCountG3Smart), nameof(IRibbonSetOnly3.RibbonCountG3Tough),
nameof(IRibbonSetOnly3.RibbonWorld),
nameof(IRibbonSetOnly3.Unused1), nameof(IRibbonSetOnly3.Unused2),
nameof(IRibbonSetOnly3.Unused3), nameof(IRibbonSetOnly3.Unused4),
};
internal static int[] RibbonCounts(this IRibbonSetOnly3 set)
{
if (set == null)
return new int[5];
return new[]
{
set.RibbonCountG3Cool,
set.RibbonCountG3Beauty,
set.RibbonCountG3Cute,
set.RibbonCountG3Smart,
set.RibbonCountG3Tough,
};
}
internal static string[] RibbonNames(this IRibbonSetOnly3 set) => RibbonSetNamesOnly3;
}
}