Add provisions for generic item filters

This commit is contained in:
Matt Nadareski
2024-03-05 09:39:12 -05:00
parent 8875948946
commit 6b7597c052
5 changed files with 37 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SabreTools.Models.Metadata;
namespace SabreTools.Filter
@@ -57,7 +58,7 @@ namespace SabreTools.Filter
foreach (var filter in this.Filters)
{
// If the filter isn't for this object type, skip
if (filter.Key[0] != itemName)
if (filter.Key[0] != itemName || (filter.Key[0] == "item" && TypeHelper.GetDatItemTypeNames().Contains(itemName)))
continue;
// If we don't get a match, it's a failure