Migrate DAT filename to a property (used by ST)

This commit is contained in:
Matt Nadareski
2026-04-02 22:17:39 -04:00
parent a914ee12c3
commit 2b472c6f37

View File

@@ -15,15 +15,6 @@ namespace SabreTools.Metadata.DatFiles
[JsonObject("header"), XmlRoot("header")]
public sealed class DatHeader : ModelBackedItem<Data.Models.Metadata.Header>, ICloneable
{
#region Constants
/// <summary>
/// External name of the DAT
/// </summary>
public const string FileNameKey = "FILENAME";
#endregion
#region Fields
public string? Author
@@ -107,6 +98,11 @@ namespace SabreTools.Metadata.DatFiles
set => _internal.EmulatorVersion = value;
}
/// <summary>
/// External name of the DAT
/// </summary>
public string? FileName { get; set; }
public MergingFlag ForceMerging
{
get => _internal.ForceMerging;
@@ -299,7 +295,11 @@ namespace SabreTools.Metadata.DatFiles
/// <summary>
/// Clone the current header
/// </summary>
public object Clone() => new DatHeader(GetInternalClone()) { DatFormat = DatFormat };
public object Clone() => new DatHeader(GetInternalClone())
{
DatFormat = DatFormat,
FileName = FileName,
};
/// <summary>
/// Clone just the format from the current header