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,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
using SabreTools.Core;
|
||||
using SabreTools.Core.Tools;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.DatItems
|
||||
@@ -71,28 +68,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 DataArea-specific fields
|
||||
if (datItemMappings.Keys.Contains(DatItemField.AreaName))
|
||||
Name = datItemMappings[DatItemField.AreaName];
|
||||
|
||||
if (datItemMappings.Keys.Contains(DatItemField.AreaSize))
|
||||
Size = Utilities.CleanLong(datItemMappings[DatItemField.AreaSize]);
|
||||
|
||||
if (datItemMappings.Keys.Contains(DatItemField.AreaWidth))
|
||||
Width = Utilities.CleanLong(datItemMappings[DatItemField.AreaWidth]);
|
||||
|
||||
if (datItemMappings.Keys.Contains(DatItemField.AreaEndianness))
|
||||
Endianness = datItemMappings[DatItemField.AreaEndianness].AsEndianness();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
Reference in New Issue
Block a user