mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-21 23:35:28 -05:00
Add forme specific cry detect
dex-form.wav
if not found, reverts to none (dex.wav)
47be96e92d (commitcomment-28950071)
This commit is contained in:
@@ -157,9 +157,15 @@ private void PlayCry(PKM pk)
|
||||
if (pk.Species == 0)
|
||||
return;
|
||||
|
||||
var path = Path.Combine("sounds", $"{pk.Species}.wav");
|
||||
string resource = $"{pk.Species}-{pk.AltForm}";
|
||||
var path = Path.Combine("sounds", $"{resource}.wav");
|
||||
if (!File.Exists(path))
|
||||
return;
|
||||
{
|
||||
resource = $"{pk.Species}";
|
||||
path = Path.Combine("sounds", $"{resource}.wav");
|
||||
if (!File.Exists(path))
|
||||
return;
|
||||
}
|
||||
|
||||
Sounds.SoundLocation = path;
|
||||
Sounds.Play();
|
||||
|
||||
Reference in New Issue
Block a user