mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Create DB version of Against; add passthroughs
This commit is contained in:
@@ -135,7 +135,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
var datItem = new KeyValuePair<long, DatItem>(kvp.Key, ProcessNullifiedItem(kvp.Value));
|
||||
|
||||
// Get the machine for the item
|
||||
var machine = ItemsDB.GetMachineForItem(datItem.Key);
|
||||
var machine = GetMachineForItemDB(datItem.Key);
|
||||
|
||||
// Write out the item if we're using machine names or we're not ignoring
|
||||
if (!Modifiers.UseRomName || !ShouldIgnore(datItem.Value, ignoreblanks))
|
||||
@@ -179,7 +179,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
/// <param name="lastgame">The name of the last game to be output</param>
|
||||
private void WriteDatItemDB(StreamWriter sw, KeyValuePair<long, DatItem> datItem, string? lastgame)
|
||||
{
|
||||
var machine = ItemsDB.GetMachineForItem(datItem.Key).Value;
|
||||
var machine = GetMachineForItemDB(datItem.Key).Value;
|
||||
WriteDatItemImpl(sw, datItem.Value, machine!, lastgame);
|
||||
}
|
||||
|
||||
|
||||
@@ -489,7 +489,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
foreach (var kvp in items)
|
||||
{
|
||||
// Get the machine for the item
|
||||
var machine = ItemsDB.GetMachineForItem(kvp.Key);
|
||||
var machine = GetMachineForItemDB(kvp.Key);
|
||||
|
||||
// If we have a different game and we're not at the start of the list, output the end of last item
|
||||
if (lastgame != null && !string.Equals(lastgame, machine.Value!.GetStringFieldValue(Models.Metadata.Machine.NameKey), StringComparison.OrdinalIgnoreCase))
|
||||
@@ -621,7 +621,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
private void WriteDatItemDB(JsonTextWriter jtw, KeyValuePair<long, DatItem> datItem)
|
||||
{
|
||||
// Get the machine for the item
|
||||
var machine = ItemsDB.GetMachineForItem(datItem.Key);
|
||||
var machine = GetMachineForItemDB(datItem.Key);
|
||||
|
||||
// Pre-process the item name
|
||||
ProcessItemName(datItem.Value, machine.Value, forceRemoveQuotes: true, forceRomName: false);
|
||||
|
||||
@@ -318,7 +318,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
foreach (var kvp in items)
|
||||
{
|
||||
// Get the machine for the item
|
||||
var machine = ItemsDB.GetMachineForItem(kvp.Key);
|
||||
var machine = GetMachineForItemDB(kvp.Key);
|
||||
|
||||
// If we have a different game and we're not at the start of the list, output the end of last item
|
||||
if (lastgame != null && !string.Equals(lastgame, machine.Value!.GetStringFieldValue(Models.Metadata.Machine.NameKey), StringComparison.OrdinalIgnoreCase))
|
||||
@@ -445,7 +445,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
private void WriteDatItemDB(XmlTextWriter xtw, KeyValuePair<long, DatItem> datItem)
|
||||
{
|
||||
// Get the machine for the item
|
||||
var machine = ItemsDB.GetMachineForItem(datItem.Key);
|
||||
var machine = GetMachineForItemDB(datItem.Key);
|
||||
|
||||
// Pre-process the item name
|
||||
ProcessItemName(datItem.Value, machine.Value, forceRemoveQuotes: true, forceRomName: false);
|
||||
|
||||
Reference in New Issue
Block a user