Revert DataArea change

This is being reverted because it was so disjoint from the other work that it is meant to work with that I was unaware of the intent of the code. This is not doing something that I feel is correct, so any changes here need to be merged into the other, more relevant PRs so it can be reviewed wholistically.
This commit is contained in:
Matt Nadareski
2022-02-22 13:47:39 -08:00
parent 243e3507d6
commit 25fad241e9

View File

@@ -27,6 +27,13 @@ namespace SabreTools.DatItems.Formats
[XmlElement("features")]
public List<PartFeature> Features { get; set; }
[JsonProperty("dataAreas", DefaultValueHandling = DefaultValueHandling.Ignore)]
[XmlElement("dataAreas")]
public List<DataArea> DataAreas { get; set; }
[JsonIgnore]
public bool DataAreasSpecified { get { return DataAreas != null && DataAreas.Count > 0; } }
[JsonIgnore]
public bool FeaturesSpecified { get { return Features != null && Features.Count > 0; } }
@@ -71,6 +78,7 @@ namespace SabreTools.DatItems.Formats
Name = this.Name,
Interface = this.Interface,
Features = this.Features,
DataAreas = this.DataAreas,
};
}
@@ -102,6 +110,15 @@ namespace SabreTools.DatItems.Formats
}
}
// If the dataareas match
if (DataAreasSpecified)
{
foreach (DataArea dataArea in DataAreas)
{
match &= newOther.DataAreas.Contains(dataArea);
}
}
return match;
}