mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user