mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Write-as-you-go for non-XML
This commit is contained in:
@@ -150,19 +150,19 @@ namespace SabreTools.Library.DatFiles
|
||||
// If we're in Romba mode, the state is consistent
|
||||
if (Romba)
|
||||
{
|
||||
state += $"{datItem.GetField(Field.SHA1, ExcludeFields)}\n";
|
||||
sw.Write($"{datItem.GetField(Field.SHA1, ExcludeFields)}\n");
|
||||
}
|
||||
// Otherwise, use any flags
|
||||
else
|
||||
{
|
||||
if (!UseRomName && datItem.MachineName != lastgame)
|
||||
{
|
||||
state += $"{datItem.GetField(Field.MachineName, ExcludeFields)}\n";
|
||||
sw.Write($"{datItem.GetField(Field.MachineName, ExcludeFields)}\n");
|
||||
lastgame = datItem.MachineName;
|
||||
}
|
||||
else if (UseRomName)
|
||||
{
|
||||
state += $"{datItem.GetField(Field.Name, ExcludeFields)}\n";
|
||||
sw.Write($"{datItem.GetField(Field.Name, ExcludeFields)}\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user