mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Ensure nullified items are taken care of
This commit is contained in:
@@ -93,8 +93,14 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Loop through and convert the items to respective lists
|
// Loop through and convert the items to respective lists
|
||||||
foreach (var item in items)
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -89,8 +89,14 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Loop through and convert the items to respective lists
|
// Loop through and convert the items to respective lists
|
||||||
foreach (var item in items)
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -254,8 +254,14 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
var dipswitches = new List<Models.ClrMamePro.DipSwitch>();
|
var dipswitches = new List<Models.ClrMamePro.DipSwitch>();
|
||||||
|
|
||||||
// Loop through and convert the items to respective lists
|
// Loop through and convert the items to respective lists
|
||||||
foreach (var item in items)
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -140,8 +140,14 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
var files = new List<Models.DosCenter.File>();
|
var files = new List<Models.DosCenter.File>();
|
||||||
|
|
||||||
// Loop through and convert the items to respective lists
|
// Loop through and convert the items to respective lists
|
||||||
foreach (var item in items)
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -106,8 +106,14 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Loop through and convert the items to respective lists
|
// Loop through and convert the items to respective lists
|
||||||
foreach (var item in items)
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -226,8 +226,15 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
if (items == null || !items.Any())
|
if (items == null || !items.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach (var item in items)
|
// Loop through and convert the items to respective lists
|
||||||
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
@@ -268,8 +275,15 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
if (items == null || !items.Any())
|
if (items == null || !items.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach (var item in items)
|
// Loop through and convert the items to respective lists
|
||||||
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
@@ -326,8 +340,15 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
if (items == null || !items.Any())
|
if (items == null || !items.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach (var item in items)
|
// Loop through and convert the items to respective lists
|
||||||
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
@@ -384,8 +405,15 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
if (items == null || !items.Any())
|
if (items == null || !items.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach (var item in items)
|
// Loop through and convert the items to respective lists
|
||||||
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
@@ -434,8 +462,15 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
if (items == null || !items.Any())
|
if (items == null || !items.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach (var item in items)
|
// Loop through and convert the items to respective lists
|
||||||
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
@@ -476,8 +511,15 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
if (items == null || !items.Any())
|
if (items == null || !items.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach (var item in items)
|
// Loop through and convert the items to respective lists
|
||||||
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
@@ -518,8 +560,15 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
if (items == null || !items.Any())
|
if (items == null || !items.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach (var item in items)
|
// Loop through and convert the items to respective lists
|
||||||
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -120,8 +120,14 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Loop through and convert the items to respective lists
|
// Loop through and convert the items to respective lists
|
||||||
foreach (var item in items)
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -151,8 +151,14 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Loop through and convert the items to respective lists
|
// Loop through and convert the items to respective lists
|
||||||
foreach (var item in items)
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -121,8 +121,14 @@ namespace SabreTools.DatFiles.Formats
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Loop through and convert the items to respective lists
|
// Loop through and convert the items to respective lists
|
||||||
foreach (var item in items)
|
for (int index = 0; index < items.Count; index++)
|
||||||
{
|
{
|
||||||
|
// Get the item
|
||||||
|
var item = items[index];
|
||||||
|
|
||||||
|
// Check for a "null" item
|
||||||
|
item = ProcessNullifiedItem(item);
|
||||||
|
|
||||||
// Skip if we're ignoring the item
|
// Skip if we're ignoring the item
|
||||||
if (ShouldIgnore(item, ignoreblanks))
|
if (ShouldIgnore(item, ignoreblanks))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ namespace SabreTools.Serialization
|
|||||||
CheckCharacters = false,
|
CheckCharacters = false,
|
||||||
Encoding = Encoding.UTF8,
|
Encoding = Encoding.UTF8,
|
||||||
Indent = true,
|
Indent = true,
|
||||||
|
IndentChars = "\t",
|
||||||
NewLineChars = "\n",
|
NewLineChars = "\n",
|
||||||
};
|
};
|
||||||
var stream = new MemoryStream();
|
var stream = new MemoryStream();
|
||||||
|
|||||||
Reference in New Issue
Block a user