diff --git a/Misc/PKX.cs b/Misc/PKX.cs index 5f9fe57f5..6c5bf4a05 100644 --- a/Misc/PKX.cs +++ b/Misc/PKX.cs @@ -2089,7 +2089,7 @@ public Set(string input, string[] species, string[] items, string[] natures, str string[] stats = { "HP", "Atk", "Def", "SpA", "SpD", "Spe" }; string[] lines = input.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); - for (int i = 0; i < lines.Length; i++) lines[i] = lines[i].Replace("'", "’"); // Sanitize apostrophes + for (int i = 0; i < lines.Length; i++) lines[i] = lines[i].Replace("'", "’").Trim(); // Sanitize apostrophes // Seek for start of set int start = -1; diff --git a/Misc/Util.cs b/Misc/Util.cs index c305a3d15..9a8d26475 100644 --- a/Misc/Util.cs +++ b/Misc/Util.cs @@ -130,7 +130,7 @@ internal static string get3DSLocation() string[] DriveList = Environment.GetLogicalDrives(); for (int i = 1; i < DriveList.Length; i++) // Skip first drive (some users still have floppy drives and would chew up time!) { - string potentialPath = DriveList[i] + Path.DirectorySeparatorChar + "Nintendo 3DS"; + string potentialPath = Path.Combine(DriveList[i], "Nintendo 3DS"); if (!Directory.Exists(potentialPath)) continue; path_3DS = potentialPath; break; diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index 081bc74c3..8458035f4 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -142,6 +142,8 @@ public Form1() path3DS = Util.get3DSLocation(); if (args.Length > 1) openQuick(args[1]); + else if (path3DS != null && File.Exists(Path.Combine(Path.GetDirectoryName(path3DS), "SaveDataBackup", "main"))) + openQuick(Path.Combine(Path.GetDirectoryName(path3DS), "SaveDataBackup", "main")); else if (pathSDF != null) openQuick(Path.Combine(pathSDF, "main")); else if (File.Exists(Util.NormalizePath(Path.Combine(Util.GetTempFolder(), "root" + Path.DirectorySeparatorChar + "main")))) @@ -2615,6 +2617,11 @@ private void clickExportSAV(object sender, EventArgs e) cySAV.InitialDirectory = path3DS; cySAV.RestoreDirectory = true; } + else if (path3DS != null && File.Exists(Path.Combine(Path.GetDirectoryName(path3DS), "SaveDataBackup", "main"))) + { + cySAV.InitialDirectory = Path.Combine(Path.GetDirectoryName(path3DS), "SaveDataBackup"); + cySAV.RestoreDirectory = true; + } else if (pathSDF != null && Directory.Exists(pathSDF)) { cySAV.InitialDirectory = pathSDF; @@ -3637,8 +3644,11 @@ private void clickSaveFileName(object sender, EventArgs e) // Get latest SaveDataFiler save location pathSDF = Util.GetSDFLocation(); string path = null; + bool sdbPath = File.Exists(Path.Combine(Path.GetDirectoryName(path3DS), "SaveDataBackup", "main")); - if (pathSDF != null && ModifierKeys != Keys.Control) // if we have a result + if (sdbPath && ModifierKeys != Keys.Control) + path = Path.Combine(Path.GetDirectoryName(path3DS), "SaveDataBackup", "main"); + else if (pathSDF != null && ModifierKeys != Keys.Shift) // if we have a result path = Path.Combine(pathSDF, "main"); else if (File.Exists(Util.NormalizePath(Path.Combine(Util.GetTempFolder(), "root" + Path.DirectorySeparatorChar + "main")))) // else if cgse exists path = Util.NormalizePath(Path.Combine(Util.GetTempFolder(), "root" + Path.DirectorySeparatorChar + "main")); @@ -3656,6 +3666,11 @@ private void clickOpenTempFolder(object sender, EventArgs e) path = Util.GetCacheFolder(); if (Directory.Exists(path)) System.Diagnostics.Process.Start("explorer.exe", @path); else Util.Alert("Can't find the cache folder."); break; + case Keys.Shift: // SaveDataBackup + Path.Combine(Path.GetDirectoryName(path3DS), "SaveDataBackup", "main"); + if (path3DS != null && File.Exists(path = Path.Combine(Path.GetDirectoryName(path3DS), "SaveDataBackup", "main"))) + System.Diagnostics.Process.Start("explorer.exe", @Path.GetDirectoryName(path)); else Util.Alert("Can't find the SaveDataBackup folder."); + break; case Keys.Alt: // SaveDataFiler path = Util.GetSDFLocation(); if (Directory.Exists(path)) System.Diagnostics.Process.Start("explorer.exe", @path); else Util.Alert("Can't find the SDF folder."); diff --git a/Resources/text/changelog.txt b/Resources/text/changelog.txt index 0d78e282c..275867270 100644 --- a/Resources/text/changelog.txt +++ b/Resources/text/changelog.txt @@ -534,7 +534,7 @@ http://projectpokemon.org/forums/showthread.php?36986 - Hotfix: Wondercard QRs with non-held items will no longer error out. Thanks ShinyMeganium! - Hotfix: Prevented export of Eon Ticket Wondercards via QR because extra data has to be altered in order for it to function. -8/8/15 - New Update: +8/8/15 - New Update: (35500) - Added: Korean Translation. Thanks cocoblue! - Added: Can now copy current moves to Relearn Moves by clicking on the Current Moves groupBox. - Fixed: Showdown Import made a little more flexible for non-exported sets (ie, user created with mistakes). Thanks Favna! @@ -542,4 +542,9 @@ http://projectpokemon.org/forums/showthread.php?36986 - Fixed: Fill Dex now doesn't error out. Thanks ShaKage! - Fixed: Characteristics should now display properly for all cases. Thanks fcugqx! - Changed: The program now keeps track of the current box to mimic the ingame box system. Thanks codemonkey85! - - Fixed: Saving the current box will no longer cause black screens when saving on the Party / Battle Box tab. Thanks RustInPeace! \ No newline at end of file + - Fixed: Saving the current box will no longer cause black screens when saving on the Party / Battle Box tab. Thanks RustInPeace! + +9/5/15 - New Update: + - Added: Auto-loading of SaveDataBackup saves on program start. Click the SAV: XXXX Label to manually trigger. + - Fixed: Showdown Importing with trailing spaces will now import properly. Thanks Favna & RustInPeace! + - Fixed: Added Korean Translation file. Thanks cocoblue! \ No newline at end of file