mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-06 05:27:14 -05:00
Misc tweaks
fix ranch pkm hacks being treated as valid (wrong severity)
fix xml docs relative to recent changes
move kata/hiragana charmapping to be like the Farfetch'd alias
{"'", 0xE0}, // Alias ' to ’ for Farfetch'd
{"’", 0xE0},
This commit is contained in:
parent
099183ae25
commit
413cfddb6c
|
|
@ -348,9 +348,9 @@ private void VerifyNicknameTrade()
|
|||
return;
|
||||
}
|
||||
if (pkm.IsNicknamed)
|
||||
AddLine(Severity.Valid, V9, CheckIdentifier.Nickname);
|
||||
AddLine(Severity.Invalid, V9, CheckIdentifier.Nickname);
|
||||
else if (OTs[lang] != pkm.OT_Name)
|
||||
AddLine(Severity.Valid, V10, CheckIdentifier.Trainer);
|
||||
AddLine(Severity.Invalid, V10, CheckIdentifier.Trainer);
|
||||
else
|
||||
AddLine(Severity.Valid, V11, CheckIdentifier.Nickname);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -139,9 +139,6 @@ public static byte[] SetString1(string value, int maxLength, bool jp, int padTo
|
|||
if (value.Length > maxLength)
|
||||
value = value.Substring(0, maxLength); // Hard cap
|
||||
|
||||
if (jp)
|
||||
value = value.Replace("\u30d8", "\u3078"); // Katakana ヘ => Hiragana へ
|
||||
|
||||
Dictionary<string, byte> dict = jp ? U2RBY_J : U2RBY_U;
|
||||
if (dict.ContainsKey(value)) // Handle "[TRAINER]"
|
||||
return new[] { dict[value], dict["\0"] };
|
||||
|
|
@ -454,6 +451,7 @@ public static string GetString7(byte[] data, int offset, int count)
|
|||
/// <param name="language">Language specific conversion (Chinese)</param>
|
||||
/// <param name="padTo">Pad to given length</param>
|
||||
/// <param name="padWith">Pad with value</param>
|
||||
/// <param name="chinese">Chinese string remapping should be attempted</param>
|
||||
/// <returns>Encoded data.</returns>
|
||||
public static byte[] SetString7(string value, int maxLength, int language, int padTo = 0, ushort padWith = 0, bool chinese = false)
|
||||
{
|
||||
|
|
@ -487,7 +485,7 @@ public static string GetG1Char(byte key, bool jp)
|
|||
/// Converts a Unicode string to Generation 7 in-game chinese string.
|
||||
/// </summary>
|
||||
/// <param name="inputstr">Unicode string.</param>
|
||||
/// <param name="cht">Pkm language is Traditional Chinese.</param>
|
||||
/// <param name="lang">Detection of language for Traditional Chinese check</param>
|
||||
/// <returns>In-game chinese string.</returns>
|
||||
private static string ConvertString2BinG7_zh(string inputstr, int lang)
|
||||
{
|
||||
|
|
@ -1084,6 +1082,7 @@ private static byte SetG3Char(ushort chr, bool jp)
|
|||
{"ひ", 0xCB},
|
||||
{"ふ", 0xCC},
|
||||
{"へ", 0xCD},
|
||||
{"ヘ", 0xCD}, // Katakana ヘ => Hiragana へ
|
||||
{"ほ", 0xCE},
|
||||
{"ま", 0xCF},
|
||||
{"み", 0xD0},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user