mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-24 04:53:08 +00:00
fc754b346b
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces) Updates all the files, one less level of indentation. Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
46 lines
1.7 KiB
C#
46 lines
1.7 KiB
C#
namespace PKHeX.Core;
|
|
|
|
/// <summary> Ribbons introduced in Generation 3 for Special Events </summary>
|
|
public interface IRibbonSetEvent3
|
|
{
|
|
bool RibbonEarth { get; set; }
|
|
bool RibbonNational { get; set; }
|
|
bool RibbonCountry { get; set; }
|
|
bool RibbonChampionBattle { get; set; }
|
|
bool RibbonChampionRegional { get; set; }
|
|
bool RibbonChampionNational { get; set; }
|
|
}
|
|
|
|
internal static partial class RibbonExtensions
|
|
{
|
|
private static readonly string[] RibbonSetNamesEvent3 =
|
|
{
|
|
nameof(IRibbonSetEvent3.RibbonEarth), nameof(IRibbonSetEvent3.RibbonNational), nameof(IRibbonSetEvent3.RibbonCountry),
|
|
nameof(IRibbonSetEvent3.RibbonChampionBattle), nameof(IRibbonSetEvent3.RibbonChampionRegional), nameof(IRibbonSetEvent3.RibbonChampionNational),
|
|
};
|
|
|
|
internal static bool[] RibbonBits(this IRibbonSetEvent3 set)
|
|
{
|
|
return new[]
|
|
{
|
|
set.RibbonEarth,
|
|
set.RibbonNational,
|
|
set.RibbonCountry,
|
|
set.RibbonChampionBattle,
|
|
set.RibbonChampionRegional,
|
|
set.RibbonChampionNational,
|
|
};
|
|
}
|
|
|
|
internal static string[] RibbonNames(this IRibbonSetEvent3 _) => RibbonSetNamesEvent3;
|
|
|
|
internal static void CopyRibbonSetEvent3(this IRibbonSetEvent3 set, IRibbonSetEvent3 dest)
|
|
{
|
|
dest.RibbonEarth = set.RibbonEarth;
|
|
dest.RibbonNational = set.RibbonNational;
|
|
dest.RibbonCountry = set.RibbonCountry;
|
|
dest.RibbonChampionBattle = set.RibbonChampionBattle;
|
|
dest.RibbonChampionRegional = set.RibbonChampionRegional;
|
|
dest.RibbonChampionNational = set.RibbonChampionNational;
|
|
}
|
|
}
|