Add FileName fetching

Non language specific export, doesn't indicate egg either (the Nickname
will though!)
This commit is contained in:
Kurt 2015-10-12 17:05:34 -07:00
parent d17a322bca
commit bd8ff36e4b
2 changed files with 13 additions and 0 deletions

View file

@ -456,6 +456,7 @@ namespace PKHeX
return ivTotal <= 150 ? 2 : 3;
}
}
public string FileName { get { return getFileName(this); } }
// Methods
public void RefreshChecksum()

View file

@ -360,6 +360,18 @@ namespace PKHeX
return response;
}
internal static string getFileName(PK6 pk6)
{
return
pk6.Species.ToString("000")
+ (pk6.IsShiny ? " ★" : "")
+ " - "
+ pk6.Nickname // Rather not have language-specific.
+ " - "
+ pk6.Checksum.ToString("X4")
+ pk6.EncryptionConstant.ToString("X8")
+ ".pk6";
}
internal static ushort[] getStats(PK6 pk6)
{
return getStats(pk6.Species, pk6.Stat_Level, pk6.Nature, pk6.AltForm,