Rename abstract pkm inherited class names

leading underscore for a class name = pls no
This commit is contained in:
Kurt 2019-10-26 12:42:33 -07:00
parent e3efa65160
commit fcc993784b
24 changed files with 29 additions and 29 deletions

View file

@ -45,7 +45,7 @@ namespace PKHeX.Core
pk.IsNicknamed = false;
string nick = SpeciesName.GetSpeciesNameGeneration(pk.Species, pk.Language, pk.Format);
pk.Nickname = nick;
if (pk is _K12 pk12)
if (pk is GBPKM pk12)
pk12.SetNotNicknamed();
return nick;
}

View file

@ -62,7 +62,7 @@ namespace PKHeX.Core
}
// Copy OT trash bytes for sensitive games (Gen1/2)
if (pk is _K12 pk12)
if (pk is GBPKM pk12)
{
switch (tr)
{

View file

@ -5,7 +5,7 @@ namespace PKHeX.Core
{
/// <summary> Generation 4 <see cref="PKM"/> format, exclusively for Pokémon Battle Revolution. </summary>
/// <remarks> Values are stored in Big Endian format rather than Little Endian. Beware. </remarks>
public sealed class BK4 : _K4
public sealed class BK4 : G4PKM
{
private static readonly byte[] Unused =
{

View file

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace PKHeX.Core
{
/// <summary> Generation 3 <see cref="PKM"/> format, exclusively for Pokémon Colosseum. </summary>
public sealed class CK3 : _K3, IShadowPKM
public sealed class CK3 : G3PKM, IShadowPKM
{
private static readonly byte[] Unused =
{

View file

@ -5,7 +5,7 @@ using System.Runtime.CompilerServices;
namespace PKHeX.Core
{
/// <summary> Generation 7 <see cref="PKM"/> format used for <see cref="GameVersion.GG"/>. </summary>
public sealed class PB7 : _K6, IHyperTrain, IAwakened
public sealed class PB7 : G6PKM, IHyperTrain, IAwakened
{
public static readonly byte[] Unused =
{

View file

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace PKHeX.Core
{
/// <summary> Generation 1 <see cref="PKM"/> format. </summary>
public sealed class PK1 : _K12
public sealed class PK1 : GBPKM
{
public override PersonalInfo PersonalInfo => PersonalTable.Y[Species];

View file

@ -3,7 +3,7 @@
namespace PKHeX.Core
{
/// <summary> Generation 2 <see cref="PKM"/> format. </summary>
public sealed class PK2 : _K12
public sealed class PK2 : GBPKM
{
public override PersonalInfo PersonalInfo => PersonalTable.C[Species];

View file

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace PKHeX.Core
{
/// <summary> Generation 3 <see cref="PKM"/> format. </summary>
public sealed class PK3 : _K3
public sealed class PK3 : G3PKM
{
private static readonly byte[] Unused =
{

View file

@ -5,7 +5,7 @@ using System.Linq;
namespace PKHeX.Core
{
/// <summary> Generation 4 <see cref="PKM"/> format. </summary>
public sealed class PK4 : _K4
public sealed class PK4 : G4PKM
{
private static readonly byte[] Unused =
{

View file

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace PKHeX.Core
{
/// <summary> Generation 6 <see cref="PKM"/> format. </summary>
public sealed class PK6 : _K6, IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetCommon3, IRibbonSetCommon4, IRibbonSetCommon6, IContestStats, IGeoTrack, ISuperTrain
public sealed class PK6 : G6PKM, IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetCommon3, IRibbonSetCommon4, IRibbonSetCommon6, IContestStats, IGeoTrack, ISuperTrain
{
private static readonly byte[] Unused =
{

View file

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace PKHeX.Core
{
/// <summary> Generation 7 <see cref="PKM"/> format. </summary>
public sealed class PK7 : _K6, IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetCommon3, IRibbonSetCommon4, IRibbonSetCommon6, IRibbonSetCommon7, IContestStats, IHyperTrain, IGeoTrack, ISuperTrain
public sealed class PK7 : G6PKM, IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetCommon3, IRibbonSetCommon4, IRibbonSetCommon6, IRibbonSetCommon7, IContestStats, IHyperTrain, IGeoTrack, ISuperTrain
{
private static readonly byte[] Unused =
{

View file

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace PKHeX.Core
{
/// <summary> Generation 8 <see cref="PKM"/> format. </summary>
public sealed class PK8 : _K6, IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetCommon3, IRibbonSetCommon4, IRibbonSetCommon6, IRibbonSetCommon7, IContestStats, IHyperTrain, IGeoTrack
public sealed class PK8 : G6PKM, IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetCommon3, IRibbonSetCommon4, IRibbonSetCommon6, IRibbonSetCommon7, IContestStats, IHyperTrain, IGeoTrack
{
private static readonly byte[] Unused =
{

View file

@ -3,7 +3,7 @@
/// <summary>
/// Generation 3 Base <see cref="PKM"/> Class
/// </summary>
public abstract class _K3 : PKM, IRibbonSetEvent3, IRibbonSetCommon3, IRibbonSetUnique3, IRibbonSetOnly3, IContestStats
public abstract class G3PKM : PKM, IRibbonSetEvent3, IRibbonSetCommon3, IRibbonSetUnique3, IRibbonSetOnly3, IContestStats
{
// Maximums
public override int MaxMoveID => Legal.MaxMoveID_3;
@ -93,7 +93,7 @@
/// </summary>
/// <typeparam name="T">Generation 3 format to convert to</typeparam>
/// <returns>New object with transferred properties.</returns>
protected T ConvertTo<T>() where T : _K3, new()
protected T ConvertTo<T>() where T : G3PKM, new()
{
var pk = new T // Convert away!
{

View file

@ -1,6 +1,6 @@
namespace PKHeX.Core
{
public abstract class _K4 : PKM, IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetUnique3, IRibbonSetUnique4, IRibbonSetCommon3, IRibbonSetCommon4, IContestStats
public abstract class G4PKM : PKM, IRibbonSetEvent3, IRibbonSetEvent4, IRibbonSetUnique3, IRibbonSetUnique4, IRibbonSetCommon3, IRibbonSetCommon4, IContestStats
{
// Maximums
public override int MaxMoveID => Legal.MaxMoveID_4;
@ -159,7 +159,7 @@
public abstract int CNT_Tough { get; set; }
public abstract int CNT_Sheen { get; set; }
protected T ConvertTo<T>() where T : _K4, new()
protected T ConvertTo<T>() where T : G4PKM, new()
{
var pk = new T
{

View file

@ -3,7 +3,7 @@
namespace PKHeX.Core
{
/// <summary> Generation 6 <see cref="PKM"/> format. </summary>
public abstract class _K6 : PKM
public abstract class G6PKM : PKM
{
public override int SIZE_PARTY => PKX.SIZE_6PARTY;
public override int SIZE_STORED => PKX.SIZE_6STORED;

View file

@ -4,7 +4,7 @@ using System.Linq;
namespace PKHeX.Core
{
public abstract class _K12 : PKM
public abstract class GBPKM : PKM
{
internal const int STRLEN_J = 6;
internal const int STRLEN_U = 11;
@ -32,7 +32,7 @@ namespace PKHeX.Core
public override bool Japanese => otname.Length == STRLEN_J;
public override byte[] Data { get; }
protected _K12(byte[] data, bool jp = false)
protected GBPKM(byte[] data, bool jp = false)
{
int partySize = SIZE_PARTY;
if (data.Length != partySize)

View file

@ -51,7 +51,7 @@ namespace PKHeX.Core
private int GetOffsetPKMOT(int base_ofs, int i) => GetOffsetPKMData(base_ofs, Capacity) + (StringLength * i);
private int GetOffsetPKMNickname(int base_ofs, int i) => GetOffsetPKMOT(base_ofs, Capacity) + (StringLength * i);
private static int GetStringLength(bool jp) => jp ? _K12.STRLEN_J : _K12.STRLEN_U;
private static int GetStringLength(bool jp) => jp ? GBPKM.STRLEN_J : GBPKM.STRLEN_U;
protected bool IsFormatParty => IsCapacityPartyFormat((PokeListType)Capacity);
protected static bool IsCapacityPartyFormat(PokeListType Capacity) => Capacity == PokeListType.Single || Capacity == PokeListType.Party;

View file

@ -128,7 +128,7 @@ namespace PKHeX.Core
/// <param name="pk">PKM to check</param>
/// <param name="prefer">Prefer a certain generation over another</param>
/// <returns>Updated PKM if actually PK7</returns>
private static _K6 CheckPKMFormat7(PK6 pk, int prefer)
private static G6PKM CheckPKMFormat7(PK6 pk, int prefer)
{
if (GameVersion.GG.Contains(pk.Version))
return new PB7(pk.Data);

View file

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace PKHeX.Core
{
/// <summary> Generation 3 <see cref="PKM"/> format, exclusively for Pokémon XD. </summary>
public sealed class XK3 : _K3, IShadowPKM
public sealed class XK3 : G3PKM, IShadowPKM
{
private static readonly byte[] Unused =
{

View file

@ -211,7 +211,7 @@ namespace PKHeX.Core
public override int BoxSlotCount => Japanese ? 30 : 20;
public override bool HasParty => true;
private int StringLength => Japanese ? _K12.STRLEN_J : _K12.STRLEN_U;
private int StringLength => Japanese ? GBPKM.STRLEN_J : GBPKM.STRLEN_U;
public override bool IsPKMPresent(byte[] data, int offset) => PKX.IsPKMPresentGB(data, offset);

View file

@ -280,7 +280,7 @@ namespace PKHeX.Core
public override bool HasParty => true;
public override bool HasNamableBoxes => true;
private int StringLength => Japanese ? _K12.STRLEN_J : _K12.STRLEN_U;
private int StringLength => Japanese ? GBPKM.STRLEN_J : GBPKM.STRLEN_U;
// Checksums
private ushort GetChecksum()

View file

@ -6,7 +6,7 @@ namespace PKHeX.WinForms.Controls
{
private void PopulateFieldsPK3()
{
if (!(pkm is _K3 pk3))
if (!(pkm is G3PKM pk3))
return;
LoadMisc1(pk3);
@ -23,7 +23,7 @@ namespace PKHeX.WinForms.Controls
private PKM PreparePK3()
{
if (!(pkm is _K3 pk3))
if (!(pkm is G3PKM pk3))
return null;
SaveMisc1(pk3);

View file

@ -26,7 +26,7 @@ namespace PKHeX.WinForms.Controls
// Minor properties
switch (pk4)
{
case _K4 p4: ShinyLeaf.SetValue(p4.ShinyLeaf);
case G4PKM p4: ShinyLeaf.SetValue(p4.ShinyLeaf);
break;
}
@ -50,7 +50,7 @@ namespace PKHeX.WinForms.Controls
// Minor properties
switch (pk4)
{
case _K4 p4:
case G4PKM p4:
p4.ShinyLeaf = ShinyLeaf.GetValue();
break;
}

View file

@ -1193,7 +1193,7 @@ namespace PKHeX.WinForms.Controls
return;
TB_Nickname.Text = SpeciesName.GetSpeciesNameGeneration(species, lang, pkm.Format);
if (pkm is _K12 pk)
if (pkm is GBPKM pk)
pk.SetNotNicknamed();
}