Sub items should not check types

This commit is contained in:
Matt Nadareski
2020-09-30 13:25:40 -07:00
parent d82a911cd9
commit 7fc49203f4
24 changed files with 302 additions and 138 deletions

View File

@@ -93,7 +93,7 @@ namespace SabreTools.Library.DatItems
if (mappings.Keys.Contains(Field.DatItem_Coins))
Coins = Sanitizer.CleanLong(mappings[Field.DatItem_Coins]);
if (Controls != null)
if (ControlsSpecified)
{
foreach (Control control in Controls)
{
@@ -159,7 +159,7 @@ namespace SabreTools.Library.DatItems
return match;
// If the controls match
if (Controls != null)
if (ControlsSpecified)
{
foreach (Control control in Controls)
{
@@ -202,11 +202,11 @@ namespace SabreTools.Library.DatItems
return false;
// Filter on individual controls
if (Controls != null)
if (ControlsSpecified)
{
foreach (Control control in Controls)
{
if (!control.PassesFilter(filter))
if (!control.PassesFilter(filter, true))
return false;
}
}
@@ -236,7 +236,7 @@ namespace SabreTools.Library.DatItems
if (fields.Contains(Field.DatItem_Coins))
Coins = null;
if (Controls != null)
if (ControlsSpecified)
{
foreach (Control control in Controls)
{