mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add No-Intro cloneofid tag
This commit is contained in:
@@ -767,6 +767,7 @@ namespace SabreTools.Core
|
|||||||
Board,
|
Board,
|
||||||
RebuildTo,
|
RebuildTo,
|
||||||
NoIntroId,
|
NoIntroId,
|
||||||
|
NoIntroCloneOfId,
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1130,6 +1130,13 @@ namespace SabreTools.Core.Tools
|
|||||||
case "no_intro_id":
|
case "no_intro_id":
|
||||||
return MachineField.NoIntroId;
|
return MachineField.NoIntroId;
|
||||||
|
|
||||||
|
case "cloneofid":
|
||||||
|
case "nointrocloneofid":
|
||||||
|
case "nointro_cloneofid":
|
||||||
|
case "no_intro_cloneofid":
|
||||||
|
case "no_intro_clone_of_id":
|
||||||
|
return MachineField.NoIntroCloneOfId;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Logiqx EmuArc
|
#region Logiqx EmuArc
|
||||||
|
|||||||
@@ -411,6 +411,7 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
Board = reader.GetAttribute("board"),
|
Board = reader.GetAttribute("board"),
|
||||||
RebuildTo = reader.GetAttribute("rebuildto"),
|
RebuildTo = reader.GetAttribute("rebuildto"),
|
||||||
NoIntroId = reader.GetAttribute("id"),
|
NoIntroId = reader.GetAttribute("id"),
|
||||||
|
NoIntroCloneOfId = reader.GetAttribute("cloneofid"),
|
||||||
Runnable = reader.GetAttribute("runnable").AsRunnable(), // Used by older DATs
|
Runnable = reader.GetAttribute("runnable").AsRunnable(), // Used by older DATs
|
||||||
|
|
||||||
CloneOf = reader.GetAttribute("cloneof"),
|
CloneOf = reader.GetAttribute("cloneof"),
|
||||||
@@ -960,6 +961,7 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
|
|
||||||
xtw.WriteOptionalAttributeString("runnable", datItem.Machine.Runnable.FromRunnable());
|
xtw.WriteOptionalAttributeString("runnable", datItem.Machine.Runnable.FromRunnable());
|
||||||
xtw.WriteOptionalAttributeString("id", datItem.Machine.NoIntroId);
|
xtw.WriteOptionalAttributeString("id", datItem.Machine.NoIntroId);
|
||||||
|
xtw.WriteOptionalAttributeString("cloneofid", datItem.Machine.NoIntroCloneOfId);
|
||||||
|
|
||||||
if (!string.Equals(datItem.Machine.Name, datItem.Machine.CloneOf, StringComparison.OrdinalIgnoreCase))
|
if (!string.Equals(datItem.Machine.Name, datItem.Machine.CloneOf, StringComparison.OrdinalIgnoreCase))
|
||||||
xtw.WriteOptionalAttributeString("cloneof", datItem.Machine.CloneOf);
|
xtw.WriteOptionalAttributeString("cloneof", datItem.Machine.CloneOf);
|
||||||
|
|||||||
@@ -370,6 +370,9 @@ namespace SabreTools.DatFiles
|
|||||||
if (MachineMappings.Keys.Contains(MachineField.NoIntroId))
|
if (MachineMappings.Keys.Contains(MachineField.NoIntroId))
|
||||||
machine.NoIntroId = MachineMappings[MachineField.NoIntroId];
|
machine.NoIntroId = MachineMappings[MachineField.NoIntroId];
|
||||||
|
|
||||||
|
if (MachineMappings.Keys.Contains(MachineField.NoIntroCloneOfId))
|
||||||
|
machine.NoIntroCloneOfId = MachineMappings[MachineField.NoIntroCloneOfId];
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Logiqx EmuArc
|
#region Logiqx EmuArc
|
||||||
|
|||||||
@@ -208,6 +208,13 @@ namespace SabreTools.DatItems
|
|||||||
[XmlElement("nointroid")]
|
[XmlElement("nointroid")]
|
||||||
public string NoIntroId { get; set; } = null;
|
public string NoIntroId { get; set; } = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// No-Intro ID for the game
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("nointrocloneofid", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||||
|
[XmlElement("nointrocloneofid")]
|
||||||
|
public string NoIntroCloneOfId { get; set; } = null;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// TODO: Should this be a separate object for TruRip?
|
// TODO: Should this be a separate object for TruRip?
|
||||||
@@ -395,6 +402,7 @@ namespace SabreTools.DatItems
|
|||||||
Board = this.Board,
|
Board = this.Board,
|
||||||
RebuildTo = this.RebuildTo,
|
RebuildTo = this.RebuildTo,
|
||||||
NoIntroId = this.NoIntroId,
|
NoIntroId = this.NoIntroId,
|
||||||
|
NoIntroCloneOfId = this.NoIntroCloneOfId,
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -215,6 +215,9 @@ namespace SabreTools.Filtering
|
|||||||
if (MachineFields.Contains(MachineField.NoIntroId))
|
if (MachineFields.Contains(MachineField.NoIntroId))
|
||||||
machine.NoIntroId = null;
|
machine.NoIntroId = null;
|
||||||
|
|
||||||
|
if (MachineFields.Contains(MachineField.NoIntroCloneOfId))
|
||||||
|
machine.NoIntroCloneOfId = null;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Logiqx EmuArc
|
#region Logiqx EmuArc
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ namespace SabreTools.Filtering
|
|||||||
public FilterItem<string> Board { get; private set; } = new FilterItem<string>();
|
public FilterItem<string> Board { get; private set; } = new FilterItem<string>();
|
||||||
public FilterItem<string> RebuildTo { get; private set; } = new FilterItem<string>();
|
public FilterItem<string> RebuildTo { get; private set; } = new FilterItem<string>();
|
||||||
public FilterItem<string> NoIntroId { get; private set; } = new FilterItem<string>();
|
public FilterItem<string> NoIntroId { get; private set; } = new FilterItem<string>();
|
||||||
|
public FilterItem<string> NoIntroCloneOfId { get; private set; } = new FilterItem<string>();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -260,6 +261,10 @@ namespace SabreTools.Filtering
|
|||||||
SetStringFilter(NoIntroId, value, negate);
|
SetStringFilter(NoIntroId, value, negate);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MachineField.NoIntroCloneOfId:
|
||||||
|
SetStringFilter(NoIntroCloneOfId, value, negate);
|
||||||
|
break;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Logiqx EmuArc
|
#region Logiqx EmuArc
|
||||||
@@ -465,6 +470,11 @@ namespace SabreTools.Filtering
|
|||||||
if (!PassStringFilter(NoIntroId, machine.NoIntroId))
|
if (!PassStringFilter(NoIntroId, machine.NoIntroId))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Machine_NoIntroCloneOfId
|
||||||
|
if (!PassStringFilter(NoIntroCloneOfId, value: machine.NoIntroCloneOfId))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Logiqx EmuArc
|
#region Logiqx EmuArc
|
||||||
|
|||||||
@@ -169,6 +169,9 @@ namespace SabreTools.Filtering
|
|||||||
if (machineFields.Contains(MachineField.NoIntroId))
|
if (machineFields.Contains(MachineField.NoIntroId))
|
||||||
machine.NoIntroId = repMachine.NoIntroId;
|
machine.NoIntroId = repMachine.NoIntroId;
|
||||||
|
|
||||||
|
if (machineFields.Contains(MachineField.NoIntroCloneOfId))
|
||||||
|
machine.NoIntroCloneOfId = repMachine.NoIntroCloneOfId;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Logiqx EmuArc
|
#region Logiqx EmuArc
|
||||||
|
|||||||
Reference in New Issue
Block a user