mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Fix typo in method names
Transferrable->Transferable
This commit is contained in:
parent
796e836811
commit
c7a610b02b
3 changed files with 11 additions and 12 deletions
|
@ -305,7 +305,7 @@ namespace PKHeX.Core
|
|||
if (HeldItem > 0)
|
||||
{
|
||||
ushort item = ItemConverter.GetG4Item((ushort)HeldItem);
|
||||
if (ItemConverter.IsItemTransferrable34(item))
|
||||
if (ItemConverter.IsItemTransferable34(item))
|
||||
pk4.HeldItem = item;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ namespace PKHeX.Core
|
|||
/// Checks if the item can be kept during 3->4 conversion.
|
||||
/// </summary>
|
||||
/// <param name="item">Generation 3 Item ID.</param>
|
||||
/// <returns>True if transferrable, False if not transferrable.</returns>
|
||||
internal static bool IsItemTransferrable34(ushort item) => item != NaN && item > 0;
|
||||
/// <returns>True if transferable, False if not transferable.</returns>
|
||||
internal static bool IsItemTransferable34(ushort item) => item != NaN && item > 0;
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Generation 3 Item ID to Generation 4+ Item ID.
|
||||
|
@ -162,12 +162,12 @@ namespace PKHeX.Core
|
|||
|
||||
internal static int GetG2ItemTransfer(int g1val)
|
||||
{
|
||||
if (!IsItemTransferrable12((ushort) g1val))
|
||||
if (!IsItemTransferable12((ushort) g1val))
|
||||
return GetTeruSamaItem(g1val);
|
||||
return g1val;
|
||||
}
|
||||
|
||||
private static bool IsItemTransferrable12(ushort item) => ((IList<ushort>) Legal.HeldItems_GSC).Contains(item);
|
||||
private static bool IsItemTransferable12(ushort item) => ((IList<ushort>) Legal.HeldItems_GSC).Contains(item);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a format specific <see cref="PKM.HeldItem"/> value depending on the desired format and the provided item index & origin format.
|
||||
|
|
|
@ -77,7 +77,6 @@ namespace PKHeX.Core
|
|||
/// Creates an instance of <see cref="PKM"/> from the given data.
|
||||
/// </summary>
|
||||
/// <param name="data">Raw data of the Pokemon file.</param>
|
||||
/// <param name="ident">Optional identifier for the Pokemon. Usually the full path of the source file.</param>
|
||||
/// <param name="prefer">Optional identifier for the preferred generation. Usually the generation of the destination save file.</param>
|
||||
/// <returns>An instance of <see cref="PKM"/> created from the given <paramref name="data"/>, or null if <paramref name="data"/> is invalid.</returns>
|
||||
public static PKM GetPKMfromBytes(byte[] data, int prefer = 7)
|
||||
|
@ -160,7 +159,7 @@ namespace PKHeX.Core
|
|||
|
||||
if (!pk.Gen4) // can't have encounter type
|
||||
return true;
|
||||
if (et > 24) // invalid encountertype
|
||||
if (et > 24) // invalid gen4 EncounterType
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -231,7 +230,7 @@ namespace PKHeX.Core
|
|||
|
||||
private static PKM ConvertPKM(PKM pk, Type PKMType, Type fromType, out string comment)
|
||||
{
|
||||
if (IsNotTransferrable(pk, out comment))
|
||||
if (IsNotTransferable(pk, out comment))
|
||||
return null;
|
||||
|
||||
Debug.WriteLine($"Trying to convert {fromType.Name} to {PKMType.Name}.");
|
||||
|
@ -304,12 +303,12 @@ namespace PKHeX.Core
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if a PKM is transferrable relative to in-game restrictions and <see cref="PKM.AltForm"/>.
|
||||
/// Checks to see if a PKM is transferable relative to in-game restrictions and <see cref="PKM.AltForm"/>.
|
||||
/// </summary>
|
||||
/// <param name="pk">PKM to convert</param>
|
||||
/// <param name="comment">Comment indicating why the <see cref="PKM"/> is not transferrable.</param>
|
||||
/// <returns>Indication if Not Transferrable</returns>
|
||||
private static bool IsNotTransferrable(PKM pk, out string comment)
|
||||
/// <param name="comment">Comment indicating why the <see cref="PKM"/> is not transferable.</param>
|
||||
/// <returns>Indication if Not Transferable</returns>
|
||||
private static bool IsNotTransferable(PKM pk, out string comment)
|
||||
{
|
||||
switch (pk.Species)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue