public static IEnumerable <PKM> GetCompatible(this SaveFile sav, IEnumerable <PKM> pks) { var savtype = sav.PKMType; foreach (var temp in pks) { var pk = PKMConverter.ConvertToType(temp, savtype, out string c); if (pk == null) { Debug.WriteLine(c); continue; } if (sav is ILangDeviantSave il && PKMConverter.IsIncompatibleGB(temp, il.Japanese, pk.Japanese)) { c = PKMConverter.GetIncompatibleGBMessage(pk, il.Japanese); Debug.WriteLine(c); continue; } var compat = sav.EvaluateCompatibility(pk); if (compat.Count > 0) { continue; } yield return(pk); } }