mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
DatItems don't know about removing fields or ORPG
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
@@ -103,33 +102,6 @@ namespace SabreTools.DatItems
|
||||
|
||||
#endregion
|
||||
|
||||
#region Filtering
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void RemoveFields(
|
||||
List<DatItemField> datItemFields,
|
||||
List<MachineField> machineFields)
|
||||
{
|
||||
// Remove common fields first
|
||||
base.RemoveFields(datItemFields, machineFields);
|
||||
|
||||
// Remove the fields
|
||||
if (datItemFields.Contains(DatItemField.Extension_Name))
|
||||
Name = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set internal names to match One Rom Per Game (ORPG) logic
|
||||
/// </summary>
|
||||
public override void SetOneRomPerGame()
|
||||
{
|
||||
string[] splitname = Name.Split('.');
|
||||
Machine.Name += $"/{string.Join(".", splitname.Take(splitname.Length > 1 ? splitname.Length - 1 : 1))}";
|
||||
Name = Path.GetFileName(Name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Sorting and Merging
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
Reference in New Issue
Block a user