mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
DatItems don't know about setting fields
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
using SabreTools.Core;
|
||||
@@ -48,31 +46,6 @@ namespace SabreTools.DatItems
|
||||
Name = name;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void SetFields(
|
||||
Dictionary<DatItemField, string> datItemMappings,
|
||||
Dictionary<MachineField, string> machineMappings)
|
||||
{
|
||||
// Set base fields
|
||||
base.SetFields(datItemMappings, machineMappings);
|
||||
|
||||
// Handle Part-specific fields
|
||||
if (datItemMappings.Keys.Contains(DatItemField.Part_Name))
|
||||
Name = datItemMappings[DatItemField.Part_Name];
|
||||
|
||||
if (datItemMappings.Keys.Contains(DatItemField.Part_Interface))
|
||||
Interface = datItemMappings[DatItemField.Part_Interface];
|
||||
|
||||
// Handle Feature-specific fields
|
||||
if (FeaturesSpecified)
|
||||
{
|
||||
foreach (PartFeature partFeature in Features)
|
||||
{
|
||||
partFeature.SetFields(datItemMappings, machineMappings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
Reference in New Issue
Block a user