mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFiles/] Create blank games always
This commit is contained in:
@@ -651,8 +651,6 @@ namespace SabreTools.Library.DatFiles
|
||||
|
||||
// If no items were found for this machine, add a Blank placeholder
|
||||
if (!containsItems)
|
||||
{
|
||||
if (this.KeepEmptyGames)
|
||||
{
|
||||
Blank blank = new Blank()
|
||||
{
|
||||
@@ -666,7 +664,6 @@ namespace SabreTools.Library.DatFiles
|
||||
ParseAddHelper(blank, clean, remUnicode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create and open an output file for writing direct from a dictionary
|
||||
|
||||
@@ -185,6 +185,7 @@ namespace SabreTools.Library.DatFiles
|
||||
RomOf = reader.GetAttribute("romof") ?? "",
|
||||
SampleOf = reader.GetAttribute("sampleof") ?? "",
|
||||
Devices = new List<string>(),
|
||||
SlotOptions = new List<string>(),
|
||||
|
||||
MachineType = (machineType == MachineType.NULL ? MachineType.None : machineType),
|
||||
};
|
||||
@@ -494,8 +495,6 @@ namespace SabreTools.Library.DatFiles
|
||||
|
||||
// If no items were found for this machine, add a Blank placeholder
|
||||
if (!containsItems)
|
||||
{
|
||||
if (this.KeepEmptyGames)
|
||||
{
|
||||
Blank blank = new Blank()
|
||||
{
|
||||
@@ -509,7 +508,6 @@ namespace SabreTools.Library.DatFiles
|
||||
ParseAddHelper(blank, clean, remUnicode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read slot information
|
||||
@@ -539,12 +537,12 @@ namespace SabreTools.Library.DatFiles
|
||||
// Get the roms from the machine
|
||||
switch (reader.Name)
|
||||
{
|
||||
case "slotoption": // These get added as devices currently
|
||||
case "slotoption":
|
||||
// string slotoption_name = reader.GetAttribute("name");
|
||||
string devname = reader.GetAttribute("devname");
|
||||
if (!machine.Devices.Contains(devname))
|
||||
if (!machine.SlotOptions.Contains(devname))
|
||||
{
|
||||
machine.Devices.Add(devname);
|
||||
machine.SlotOptions.Add(devname);
|
||||
}
|
||||
// bool? slotoption_default = Utilities.GetYesNo(reader.GetAttribute("default"));
|
||||
reader.Read();
|
||||
|
||||
@@ -536,8 +536,6 @@ namespace SabreTools.Library.DatFiles
|
||||
|
||||
// If no items were found for this machine, add a Blank placeholder
|
||||
if (!containsItems)
|
||||
{
|
||||
if (this.KeepEmptyGames)
|
||||
{
|
||||
Blank blank = new Blank()
|
||||
{
|
||||
@@ -551,7 +549,6 @@ namespace SabreTools.Library.DatFiles
|
||||
ParseAddHelper(blank, clean, remUnicode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read TruRip information
|
||||
|
||||
@@ -198,8 +198,6 @@ namespace SabreTools.Library.DatFiles
|
||||
|
||||
// If no items were found for this machine, add a Blank placeholder
|
||||
if (!containsItems)
|
||||
{
|
||||
if (this.KeepEmptyGames)
|
||||
{
|
||||
Blank blank = new Blank()
|
||||
{
|
||||
@@ -213,7 +211,6 @@ namespace SabreTools.Library.DatFiles
|
||||
ParseAddHelper(blank, clean, remUnicode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read dump information
|
||||
|
||||
@@ -462,14 +462,7 @@ namespace SabreTools.Library.DatFiles
|
||||
break;
|
||||
default:
|
||||
// By default, create a new Blank, just in case
|
||||
if (this.KeepEmptyGames)
|
||||
{
|
||||
datItem = new Blank();
|
||||
}
|
||||
else
|
||||
{
|
||||
datItem = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -230,8 +230,6 @@ namespace SabreTools.Library.DatFiles
|
||||
|
||||
// If no items were found for this machine, add a Blank placeholder
|
||||
if (!containsItems)
|
||||
{
|
||||
if (this.KeepEmptyGames)
|
||||
{
|
||||
Blank blank = new Blank()
|
||||
{
|
||||
@@ -245,7 +243,6 @@ namespace SabreTools.Library.DatFiles
|
||||
ParseAddHelper(blank, clean, remUnicode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read part information
|
||||
|
||||
Reference in New Issue
Block a user