mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
DatItems don't know about filtering
This commit is contained in:
@@ -5,7 +5,6 @@ using System.Xml.Serialization;
|
||||
|
||||
using SabreTools.Core;
|
||||
using SabreTools.Core.Tools;
|
||||
using SabreTools.Filtering;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.DatItems
|
||||
@@ -166,38 +165,6 @@ namespace SabreTools.DatItems
|
||||
|
||||
#region Filtering
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool PassesFilter(Cleaner cleaner, bool sub = false)
|
||||
{
|
||||
// Check common fields first
|
||||
if (!base.PassesFilter(cleaner, sub))
|
||||
return false;
|
||||
|
||||
// Filter on item name
|
||||
if (!Filter.PassStringFilter(cleaner.DatItemFilter.Setting_Name, Name))
|
||||
return false;
|
||||
|
||||
// Filter on value
|
||||
if (!Filter.PassStringFilter(cleaner.DatItemFilter.Setting_Value, Value))
|
||||
return false;
|
||||
|
||||
// Filter on default
|
||||
if (!Filter.PassBoolFilter(cleaner.DatItemFilter.Setting_Default, Default))
|
||||
return false;
|
||||
|
||||
// Filter on individual conditions
|
||||
if (ConditionsSpecified)
|
||||
{
|
||||
foreach (Condition condition in Conditions)
|
||||
{
|
||||
if (!condition.PassesFilter(cleaner, true))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void RemoveFields(
|
||||
List<DatItemField> datItemFields,
|
||||
|
||||
Reference in New Issue
Block a user