From bd8ff36e4bec5e95dcaba335bd0511521e00c3a3 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 12 Oct 2015 17:05:34 -0700 Subject: [PATCH] Add FileName fetching Non language specific export, doesn't indicate egg either (the Nickname will though!) --- Misc/PK6.cs | 1 + Misc/PKX.cs | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/Misc/PK6.cs b/Misc/PK6.cs index 84d883438..aa6c5c0b8 100644 --- a/Misc/PK6.cs +++ b/Misc/PK6.cs @@ -456,6 +456,7 @@ public int PotentialRating return ivTotal <= 150 ? 2 : 3; } } + public string FileName { get { return getFileName(this); } } // Methods public void RefreshChecksum() diff --git a/Misc/PKX.cs b/Misc/PKX.cs index c34ceedb8..a41b8427c 100644 --- a/Misc/PKX.cs +++ b/Misc/PKX.cs @@ -360,6 +360,18 @@ internal static string[] getQRText(PK6 pk6) 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,