Add sound path

Closes #1943
This commit is contained in:
Kurt 2018-05-14 15:46:36 -07:00
parent c10b01dc83
commit 663ec5c536
2 changed files with 5 additions and 2 deletions

View file

@ -178,11 +178,13 @@ namespace PKHeX.WinForms.Controls
return;
string resource = $"{pk.Species}-{pk.AltForm}";
var path = Path.Combine("sounds", $"{resource}.wav");
string getpath() => Path.Combine(Main.CryPath, $"{resource}.wav");
var path = getpath();
if (!File.Exists(path))
{
resource = $"{pk.Species}";
path = Path.Combine("sounds", $"{resource}.wav");
path = getpath();
if (!File.Exists(path))
return;
}

View file

@ -92,6 +92,7 @@ namespace PKHeX.WinForms
public static string DatabasePath => Path.Combine(WorkingDirectory, "pkmdb");
public static string MGDatabasePath => Path.Combine(WorkingDirectory, "mgdb");
public static string BackupPath => Path.Combine(WorkingDirectory, "bak");
public static string CryPath => Path.Combine(WorkingDirectory, "sounds");
private static string TemplatePath => Path.Combine(WorkingDirectory, "template");
private static string PluginPath => Path.Combine(WorkingDirectory, "plugins");
private const string ThreadPath = "https://projectpokemon.org/pkhex/";