DatItems don't know about replacing fields

This commit is contained in:
Matt Nadareski
2020-12-14 10:58:43 -08:00
parent bfdf219a78
commit 1690308894
40 changed files with 985 additions and 1486 deletions

View File

@@ -94,34 +94,5 @@ namespace SabreTools.DatItems
}
#endregion
#region Sorting and Merging
/// <inheritdoc/>
public override void ReplaceFields(
DatItem item,
List<DatItemField> datItemFields,
List<MachineField> machineFields)
{
// Replace common fields first
base.ReplaceFields(item, datItemFields, machineFields);
// If we don't have a Port to replace from, ignore specific fields
if (item.ItemType != ItemType.Port)
return;
// Cast for easier access
Port newItem = item as Port;
// Replace the fields
if (datItemFields.Contains(DatItemField.Name))
Tag = newItem.Tag;
// DatItem_Analog_* doesn't make sense here
// since not every analog under the other item
// can replace every analog under this item
}
#endregion
}
}