mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Misc tweaks
Add notransfer for SV-ride legend Replace dummy '0' in gen3 chartable to match Bulbapedia -- inaccessible char for entry anyways, and the byte never fetched via IndexOf due to the previous occurrence of '0'. Enhance file namer interface to tag with a display name
This commit is contained in:
parent
581d5158dc
commit
a24e6e9cef
3 changed files with 19 additions and 2 deletions
|
@ -127,7 +127,7 @@ public static class StringConverter3
|
|||
'⑬', '“', '”', '‘', '’', '♂', '♀', '$', ',', '⑧', '/', 'A', 'B', 'C', 'D', 'E', // B
|
||||
'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', // C
|
||||
'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', // D
|
||||
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', // E
|
||||
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '▶', // E
|
||||
':', 'Ä', 'Ö', 'Ü', 'ä', 'ö', 'ü', // F
|
||||
|
||||
// Make the total length 256 so that any byte access is always within the array
|
||||
|
@ -150,7 +150,7 @@ public static class StringConverter3
|
|||
'⋯', '『', '』', '「', '」', '♂', '♀', '$', '.', '⑧', '/', 'A', 'B', 'C', 'D', 'E', // B
|
||||
'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', // C
|
||||
'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', // D
|
||||
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', // E
|
||||
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '▶', // E
|
||||
':', 'Ä', 'Ö', 'Ü', 'ä', 'ö', 'ü', // F
|
||||
|
||||
// Make the total length 256 so that any byte access is always within the array
|
||||
|
|
|
@ -174,6 +174,7 @@ public static class EntityConverter
|
|||
PB7 { Species: (int)Species.Eevee, Form: not 0 } => IncompatibleForm,
|
||||
PB8 { Species: (int)Species.Spinda } => IncompatibleSpecies, // Incorrect arrangement of spots (PID endianness)
|
||||
PB8 { Species: (int)Species.Nincada } => IncompatibleSpecies, // Clone paranoia with Shedinja
|
||||
PK9 { Species: (int)Species.Koraidon or (int)Species.Miraidon, FormArgument: not 0 } => IncompatibleForm, // Ride
|
||||
_ => Success,
|
||||
};
|
||||
|
||||
|
|
|
@ -17,6 +17,12 @@ public static class EntityFileNamer
|
|||
/// <param name="pk">Input entity to create a file name for.</param>
|
||||
/// <returns>File name for the <see cref="pk"/> data</returns>
|
||||
public static string GetName(PKM pk) => Namer.GetName(pk);
|
||||
|
||||
/// <summary>
|
||||
/// A list of all available <see cref="IFileNamer{PKM}"/> objects.
|
||||
/// </summary>
|
||||
/// <remarks>Used for UI display.</remarks>
|
||||
public static readonly List<IFileNamer<PKM>> AvailableNamers = [Namer];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -24,6 +30,8 @@ public static class EntityFileNamer
|
|||
/// </summary>
|
||||
public sealed class DefaultEntityNamer : IFileNamer<PKM>
|
||||
{
|
||||
public string Name => "Default";
|
||||
|
||||
public string GetName(PKM obj)
|
||||
{
|
||||
if (obj is GBPKM gb)
|
||||
|
@ -60,6 +68,14 @@ public sealed class DefaultEntityNamer : IFileNamer<PKM>
|
|||
/// <typeparam name="T">Type that the implementer can create a file name for.</typeparam>
|
||||
public interface IFileNamer<in T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Human-readable name of the <see cref="IFileNamer{T}"/> implementation.
|
||||
/// </summary>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the file name (without extension) for the input <see cref="obj"/> data.
|
||||
/// </summary>
|
||||
string GetName(T obj);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue