mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Consolidate replacement code
This commit is contained in:
@@ -557,6 +557,15 @@ namespace SabreTools.DatItems
|
||||
public bool RemoveField(string? fieldName)
|
||||
=> FieldManipulator.RemoveField(_machine, fieldName);
|
||||
|
||||
/// <summary>
|
||||
/// Replace a field from another Machine
|
||||
/// </summary>
|
||||
/// <param name="other">Machine to replace field from</param>
|
||||
/// <param name="fieldName">Field to replace</param>
|
||||
/// <returns>True if the replacement was successful, false otherwise</returns>
|
||||
public bool ReplaceField(Machine? other, string? fieldName)
|
||||
=> FieldManipulator.ReplaceField(other?._machine, _machine, fieldName);
|
||||
|
||||
/// <summary>
|
||||
/// Set a field in the Machine from a mapping string
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user