mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-30 19:48:11 -05:00
Fix untrimmed showdown set
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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!
|
||||
- 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!
|
||||
Reference in New Issue
Block a user