Create and use DatItems.FeatureType

This commit is contained in:
Matt Nadareski
2020-09-02 14:04:02 -07:00
parent 3d55e1462b
commit 26bb28afba
14 changed files with 347 additions and 199 deletions

View File

@@ -292,7 +292,7 @@ namespace SabreTools.Library.DatFiles
case "feature":
datItems.Add(new Feature
{
Type = reader.GetAttribute("type"),
Type = reader.GetAttribute("type").AsFeatureType(),
Status = reader.GetAttribute("status"),
Overall = reader.GetAttribute("overall"),
});
@@ -1569,7 +1569,7 @@ namespace SabreTools.Library.DatFiles
case ItemType.Feature:
var feature = datItem as Feature;
xtw.WriteStartElement("feature");
xtw.WriteOptionalAttributeString("type", feature.Type);
xtw.WriteOptionalAttributeString("type", feature.Type.FromFeatureType());
xtw.WriteOptionalAttributeString("status", feature.Status);
xtw.WriteOptionalAttributeString("overall", feature.Overall);
xtw.WriteEndElement();