mirror of
https://github.com/kwsch/PKHeX
synced 2025-01-05 09:08:45 +00:00
5bcccc6d92
* Revises legality checks to account for traveling between the three game islands (PLA/BDSP/SWSH) * Adds conversion mechanisms between the three formats, as well as flexible conversion options to backfill missing data (thanks GameFreak/ILCA for opting for lossy conversion instead of updating the games). * Adds API abstractions for HOME data storage format (EKH/PKH format 1, aka EH1/PH1). * Revises some APIs for better usage: - `PKM` now exposes a `Context` to indicate the isolation context for legality purposes. - Some method signatures have changed to accept `Context` or `GameVersion` instead of a vague `int` for Generation. - Evolution History is now tracked in the Legality parse for specific contexts, rather than only per generation.
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
namespace PKHeX.Core
|
|
{
|
|
/// <summary> Common Ribbons introduced in Generation 3 </summary>
|
|
public interface IRibbonSetCommon3
|
|
{
|
|
bool RibbonChampionG3 { get; set; }
|
|
bool RibbonArtist { get; set; }
|
|
bool RibbonEffort { get; set; }
|
|
}
|
|
|
|
internal static partial class RibbonExtensions
|
|
{
|
|
private static readonly string[] RibbonSetNamesCommon3 =
|
|
{
|
|
nameof(IRibbonSetCommon3.RibbonChampionG3), nameof(IRibbonSetCommon3.RibbonArtist), nameof(IRibbonSetCommon3.RibbonEffort),
|
|
};
|
|
|
|
internal static bool[] RibbonBits(this IRibbonSetCommon3 set)
|
|
{
|
|
return new[]
|
|
{
|
|
set.RibbonChampionG3,
|
|
set.RibbonArtist,
|
|
set.RibbonEffort,
|
|
};
|
|
}
|
|
|
|
internal static string[] RibbonNames(this IRibbonSetCommon3 _) => RibbonSetNamesCommon3;
|
|
|
|
internal static void CopyRibbonSetCommon3(this IRibbonSetCommon3 set, IRibbonSetCommon3 dest)
|
|
{
|
|
dest.RibbonChampionG3 = set.RibbonChampionG3;
|
|
dest.RibbonArtist = set.RibbonArtist;
|
|
dest.RibbonEffort = set.RibbonEffort;
|
|
}
|
|
}
|
|
}
|