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> /// <summary>
/// System /// System
/// </summary> /// </summary>
/// <remarks>Known as "plugin" in RomCenter</remarks>
[JsonProperty("system")] [JsonProperty("system")]
public string System { get; set; } public string System { get; set; }

View File

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