mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-07-16 02:10:53 -05:00
* Fix PBR checksums * Fix PBR desyncs between Data/Container - CurrentSlot.set reloads Data from Container, so copy other.Data to Data after - When editing the OT name, use Data if the requested slot is the current slot * Correct PBR party offset/size * Add GameVersion.BATREV * Add Gear Editor * Add Battle Pass/Trainer Info Editor for PBR * Minor tweaks * Fix ResetGear/UpdatePresetIndexes
66 lines
1.8 KiB
C#
66 lines
1.8 KiB
C#
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// <see cref="SAV4BR"/> Game Language IDs
|
|
/// </summary>
|
|
public enum LanguageBR : byte
|
|
{
|
|
/// <summary>
|
|
/// Japanese (日本語) or English (US/UK/AU)
|
|
/// </summary>
|
|
/// <remarks>Language value is only used by PAL, and is ignored/left as 0 by NTSC-J/NTSC-U.</remarks>
|
|
JapaneseOrEnglish = 0,
|
|
|
|
/// <summary>
|
|
/// German (Deutsch)
|
|
/// </summary>
|
|
German = 1,
|
|
|
|
/// <summary>
|
|
/// Spanish (Español)
|
|
/// </summary>
|
|
Spanish = 2,
|
|
|
|
/// <summary>
|
|
/// French (Français)
|
|
/// </summary>
|
|
French = 3,
|
|
|
|
/// <summary>
|
|
/// Italian (Italiano)
|
|
/// </summary>
|
|
Italian = 4,
|
|
}
|
|
|
|
/// <summary>
|
|
/// Extension to convert between <see cref="LanguageBR"/> and <see cref="LanguageID"/>.
|
|
/// </summary>
|
|
public static class LanguageBRRemap
|
|
{
|
|
/// <summary>
|
|
/// Converts <see cref="LanguageBR"/> to <see cref="LanguageID"/>.
|
|
/// </summary>
|
|
public static LanguageID ToLanguageID(this LanguageBR lang) => lang switch
|
|
{
|
|
LanguageBR.JapaneseOrEnglish => LanguageID.English,
|
|
LanguageBR.German => LanguageID.German,
|
|
LanguageBR.Spanish => LanguageID.Spanish,
|
|
LanguageBR.French => LanguageID.French,
|
|
LanguageBR.Italian => LanguageID.Italian,
|
|
_ => LanguageID.English,
|
|
};
|
|
|
|
/// <summary>
|
|
/// Converts <see cref="LanguageID"/> to <see cref="LanguageBR"/>.
|
|
/// </summary>
|
|
public static LanguageBR ToLanguageBR(this LanguageID lang) => lang switch
|
|
{
|
|
LanguageID.Japanese or LanguageID.English => LanguageBR.JapaneseOrEnglish,
|
|
LanguageID.German => LanguageBR.German,
|
|
LanguageID.Spanish => LanguageBR.Spanish,
|
|
LanguageID.French => LanguageBR.French,
|
|
LanguageID.Italian => LanguageBR.Italian,
|
|
_ => LanguageBR.JapaneseOrEnglish,
|
|
};
|
|
}
|