mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-04 01:39:13 +00:00
Minor clean
invert nesting, add missing if( space, group OT checks together
This commit is contained in:
parent
d58aed109d
commit
7c8f52cbbf
4 changed files with 22 additions and 22 deletions
|
@ -30,26 +30,25 @@ namespace PKHeX.Core
|
||||||
public static ModifyResult SetSuggestedMasteryData(BatchInfo info, string propValue)
|
public static ModifyResult SetSuggestedMasteryData(BatchInfo info, string propValue)
|
||||||
{
|
{
|
||||||
var pk = info.Entity;
|
var pk = info.Entity;
|
||||||
if (pk is IMoveShop8Mastery t)
|
if (pk is not IMoveShop8Mastery t)
|
||||||
|
return ModifyResult.Invalid;
|
||||||
|
|
||||||
|
if (IsAll(propValue))
|
||||||
{
|
{
|
||||||
if (IsAll(propValue))
|
t.SetMoveShopFlags();
|
||||||
{
|
t.SetMoveShopFlagsMastered();
|
||||||
t.SetMoveShopFlags();
|
|
||||||
t.SetMoveShopFlagsMastered();
|
|
||||||
}
|
|
||||||
else if (!IsNone(propValue))
|
|
||||||
{
|
|
||||||
// whatever fit the current moves
|
|
||||||
t.SetMoveShopFlags(pk.Moves);
|
|
||||||
t.SetMoveShopFlagsMastered();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
t.ClearMoveShopFlags();
|
|
||||||
}
|
|
||||||
return ModifyResult.Modified;
|
|
||||||
}
|
}
|
||||||
return ModifyResult.Invalid;
|
else if (!IsNone(propValue))
|
||||||
|
{
|
||||||
|
// whatever fit the current moves
|
||||||
|
t.SetMoveShopFlags(pk.Moves);
|
||||||
|
t.SetMoveShopFlagsMastered();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t.ClearMoveShopFlags();
|
||||||
|
}
|
||||||
|
return ModifyResult.Modified;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ModifyResult SetSuggestedRibbons(BatchInfo info, string value)
|
public static ModifyResult SetSuggestedRibbons(BatchInfo info, string value)
|
||||||
|
|
|
@ -122,7 +122,7 @@ namespace PKHeX.Core
|
||||||
return EncounterMatchRating.DeferredErrors;
|
return EncounterMatchRating.DeferredErrors;
|
||||||
|
|
||||||
// Galar Mine hidden encounters can only be found via Curry or Fishing.
|
// Galar Mine hidden encounters can only be found via Curry or Fishing.
|
||||||
if(Location is (30 or 54) && SlotType is AreaSlotType8.HiddenMain && !m.RibbonMarkCurry && !SlotType.CanEncounterViaFishing(Weather))
|
if (Location is (30 or 54) && SlotType is AreaSlotType8.HiddenMain && !m.RibbonMarkCurry && !SlotType.CanEncounterViaFishing(Weather))
|
||||||
return EncounterMatchRating.DeferredErrors;
|
return EncounterMatchRating.DeferredErrors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,11 @@ namespace PKHeX.Core
|
||||||
{
|
{
|
||||||
if (WordFilter.IsFiltered(ot, out string bad))
|
if (WordFilter.IsFiltered(ot, out string bad))
|
||||||
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
|
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
|
||||||
if (WordFilter.IsFiltered(pkm.HT_Name, out bad))
|
|
||||||
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
|
|
||||||
if (ContainsTooManyNumbers(ot, data.Info.Generation))
|
if (ContainsTooManyNumbers(ot, data.Info.Generation))
|
||||||
data.AddLine(GetInvalid("Wordfilter: Too many numbers."));
|
data.AddLine(GetInvalid("Wordfilter: Too many numbers."));
|
||||||
|
|
||||||
|
if (WordFilter.IsFiltered(pkm.HT_Name, out bad))
|
||||||
|
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ namespace PKHeX.WinForms
|
||||||
|
|
||||||
if (entry.Source is SlotInfoBox info && SAV.GetSlotFlags(info.Box, info.Slot).IsOverwriteProtected())
|
if (entry.Source is SlotInfoBox info && SAV.GetSlotFlags(info.Box, info.Slot).IsOverwriteProtected())
|
||||||
editor.AddSkipped();
|
editor.AddSkipped();
|
||||||
else if(!BatchEditing.IsFilterMatchMeta(filterMeta, entry))
|
else if (!BatchEditing.IsFilterMatchMeta(filterMeta, entry))
|
||||||
editor.AddSkipped();
|
editor.AddSkipped();
|
||||||
else
|
else
|
||||||
editor.Process(pk, Filters, Instructions);
|
editor.Process(pk, Filters, Instructions);
|
||||||
|
|
Loading…
Reference in a new issue