mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Use DictionaryBase for setters
This commit is contained in:
@@ -97,6 +97,20 @@ namespace SabreTools.DatItems.Formats
|
||||
return FieldManipulator.RemoveField(_internal, fieldName);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool SetField(DatItemField datItemField, string value)
|
||||
{
|
||||
// Get the correct internal field name
|
||||
string? fieldName = datItemField switch
|
||||
{
|
||||
DatItemField.Value => Models.Metadata.SharedFeat.ValueKey,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
// Set the field and return
|
||||
return FieldManipulator.SetField(_internal, fieldName, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user