mirror of
https://github.com/kwsch/PKHeX
synced 2024-09-21 14:51:55 +00:00
Compare propertyvalue for Legal batch
seal the classes, no need to derive (nothing virtual)
This commit is contained in:
parent
aeb83c8269
commit
6ee552b860
4 changed files with 5 additions and 5 deletions
|
@ -8,8 +8,8 @@ namespace PKHeX.Core
|
|||
public static readonly List<IComplexFilter> FilterMods = new()
|
||||
{
|
||||
new ComplexFilter(PROP_LEGAL,
|
||||
(pkm, cmd) => new LegalityAnalysis(pkm).Valid == cmd.Evaluator,
|
||||
(info, cmd) => info.Legality.Valid == cmd.Evaluator),
|
||||
(pkm, cmd) => bool.TryParse(cmd.PropertyValue, out var b) && (b == new LegalityAnalysis(pkm).Valid) == cmd.Evaluator,
|
||||
(info, cmd) => bool.TryParse(cmd.PropertyValue, out var b) && (b == info.Legality.Valid) == cmd.Evaluator),
|
||||
|
||||
new ComplexFilter(PROP_TYPENAME,
|
||||
(pkm, cmd) => (pkm.GetType().Name == cmd.PropertyValue) == cmd.Evaluator,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace PKHeX.Core
|
||||
{
|
||||
/// <inheritdoc cref="IComplexFilter"/>
|
||||
public class ComplexFilter : IComplexFilter
|
||||
public sealed class ComplexFilter : IComplexFilter
|
||||
{
|
||||
private readonly string Property;
|
||||
private readonly Func<PKM, StringInstruction, bool> FilterPKM;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace PKHeX.Core
|
||||
{
|
||||
/// <inheritdoc cref="IComplexSet"/>
|
||||
public class ComplexSet : IComplexSet
|
||||
public sealed class ComplexSet : IComplexSet
|
||||
{
|
||||
public readonly string PropertyName;
|
||||
public readonly Func<string, bool> IsValueCompatible = _ => true;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace PKHeX.Core
|
||||
{
|
||||
/// <inheritdoc cref="IComplexFilter"/>
|
||||
public class MetaFilter : IComplexFilterMeta
|
||||
public sealed class MetaFilter : IComplexFilterMeta
|
||||
{
|
||||
private readonly string Property;
|
||||
private readonly Func<object, StringInstruction, bool> FilterPKM;
|
||||
|
|
Loading…
Reference in a new issue