Add pk1/pk2 direct import checks

dragdrop: check
import files from folder: check
no other paths convert afaik

Closes #2074
This commit is contained in:
Kurt 2018-07-24 15:49:00 -07:00
parent 81355dfaf4
commit 64284eafef
3 changed files with 16 additions and 1 deletions

View file

@ -416,7 +416,7 @@ namespace PKHeX.Core
return pkm != null;
}
private static string GetIncompatibleGBMessage(PKM pk, bool destJP)
public static string GetIncompatibleGBMessage(PKM pk, bool destJP)
{
var src = destJP ? MsgPKMConvertInternational : MsgPKMConvertJapanese;
var dest = !destJP ? MsgPKMConvertInternational : MsgPKMConvertJapanese;

View file

@ -136,6 +136,13 @@ namespace PKHeX.Core
continue;
}
if (PKMConverter.IsIncompatibleGB(pk.Format, SAV.Japanese, pk.Japanese))
{
c = PKMConverter.GetIncompatibleGBMessage(pk, SAV.Japanese);
Debug.WriteLine(c);
continue;
}
var compat = SAV.IsPKMCompatible(pk);
if (compat.Count > 0)
continue;

View file

@ -383,6 +383,14 @@ namespace PKHeX.WinForms.Controls
if (noEgg && (pk.Species == 0 || pk.IsEgg))
return false;
if (PKMConverter.IsIncompatibleGB(pk.Format, SAV.Japanese, pk.Japanese))
{
c = PKMConverter.GetIncompatibleGBMessage(pk, SAV.Japanese);
WinFormsUtil.Error(c);
Debug.WriteLine(c);
return false;
}
var errata = SAV.IsPKMCompatible(pk);
if (errata.Count > 0)
{