DatItems don't know about filtering

This commit is contained in:
Matt Nadareski
2020-12-13 21:47:42 -08:00
parent 67bfe0dae9
commit 3fcec263e0
40 changed files with 1325 additions and 1458 deletions

View File

@@ -460,29 +460,6 @@ namespace SabreTools.DatItems
#region Filtering
/// <summary>
/// Check to see if a DatItem passes the filter
/// </summary>
/// <param name="cleaner">Cleaner containing filters to check against</param>
/// <param name="sub">True if this is a subitem, false otherwise</param>
/// <returns>True if the item passed the filter, false otherwise</returns>
public virtual bool PassesFilter(Cleaner cleaner, bool sub = false)
{
// Filter on machine fields
if (!Machine.PassesFilter(cleaner))
return false;
// Filters for if we're a top-level item
if (!sub)
{
// Filter on item type
if (!Filter.PassStringFilter(cleaner.DatItemFilter.Type, ItemType.ToString()))
return false;
}
return true;
}
/// <summary>
/// Remove fields from the DatItem
/// </summary>