mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add history tag support (fixes #34)
This commit is contained in:
@@ -902,6 +902,9 @@ namespace SabreTools.DatItems
|
||||
|
||||
#region ListXML
|
||||
|
||||
if (fields.Contains(MachineField.History))
|
||||
machine.History = null;
|
||||
|
||||
if (fields.Contains(MachineField.SourceFile))
|
||||
machine.SourceFile = null;
|
||||
|
||||
@@ -1891,6 +1894,9 @@ namespace SabreTools.DatItems
|
||||
|
||||
#region ListXML
|
||||
|
||||
if (machineFields.Contains(MachineField.History))
|
||||
machine.History = repMachine.History;
|
||||
|
||||
if (machineFields.Contains(MachineField.SourceFile))
|
||||
machine.SourceFile = repMachine.SourceFile;
|
||||
|
||||
@@ -2839,6 +2845,9 @@ namespace SabreTools.DatItems
|
||||
|
||||
#region ListXML
|
||||
|
||||
if (mappings.Keys.Contains(MachineField.History))
|
||||
machine.History = mappings[MachineField.History];
|
||||
|
||||
if (mappings.Keys.Contains(MachineField.SourceFile))
|
||||
machine.SourceFile = mappings[MachineField.SourceFile];
|
||||
|
||||
|
||||
@@ -157,6 +157,13 @@ namespace SabreTools.DatItems
|
||||
|
||||
#region ListXML
|
||||
|
||||
/// <summary>
|
||||
/// History.dat entry for the machine
|
||||
/// </summary>
|
||||
[JsonProperty("history", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
[XmlElement("history")]
|
||||
public string History { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Emulator source file related to the machine
|
||||
/// </summary>
|
||||
@@ -370,6 +377,7 @@ namespace SabreTools.DatItems
|
||||
|
||||
#region ListXML
|
||||
|
||||
History = this.History,
|
||||
SourceFile = this.SourceFile,
|
||||
Runnable = this.Runnable,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user