Wire up plugin for RomCenter

This commit is contained in:
Matt Nadareski
2020-08-20 15:57:52 -07:00
parent 25b35595ba
commit 3c5931fce8
3 changed files with 6 additions and 2 deletions

View File

@@ -220,6 +220,7 @@ namespace SabreTools.Library.DatFiles
/// <summary>
/// System
/// </summary>
/// <remarks>Known as "plugin" in RomCenter</remarks>
[JsonProperty("system")]
public string System { get; set; }

View File

@@ -124,7 +124,7 @@ namespace SabreTools.Library.DatFiles
continue;
}
// Get all credits items (ONLY OVERWRITE IF THERE'S NO DATA)
// Get all credits items
switch (kvp?.Key.ToLowerInvariant())
{
case "author":
@@ -199,7 +199,7 @@ namespace SabreTools.Library.DatFiles
continue;
}
// Get all dat items (ONLY OVERWRITE IF THERE'S NO DATA)
// Get all dat items
switch (kvp?.Key.ToLowerInvariant())
{
case "version":
@@ -207,6 +207,7 @@ namespace SabreTools.Library.DatFiles
break;
case "plugin":
Header.System = (Header.System != null ? kvp?.Value : Header.System);
reader.ReadNextLine();
break;
@@ -473,6 +474,7 @@ namespace SabreTools.Library.DatFiles
iw.WriteSection("DAT");
iw.WriteKeyValuePair("version", "2.50");
iw.WriteKeyValuePair("plugin", Header.System);
iw.WriteKeyValuePair("split", Header.ForceMerging == ForceMerging.Split ? "1" : "0");
iw.WriteKeyValuePair("merge", Header.ForceMerging == ForceMerging.Full || Header.ForceMerging == ForceMerging.Merged ? "1" : "0");

View File

@@ -793,6 +793,7 @@ namespace SabreTools.Library.DatFiles
#region OfflineList
case "system":
case "plugin":
return "DatFile.System";
case "screenshotwidth":