mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Remove now-unnecessary flag
This commit is contained in:
@@ -211,11 +211,8 @@ namespace SabreTools.DatFiles
|
|||||||
/// <remarks>Assumes items are bucketed by <see cref="ItemKey.Machine"/></remarks>
|
/// <remarks>Assumes items are bucketed by <see cref="ItemKey.Machine"/></remarks>
|
||||||
internal void RemoveItemsFromRomOfChild()
|
internal void RemoveItemsFromRomOfChild()
|
||||||
{
|
{
|
||||||
// TODO: Figure out why the bios flag is needed
|
RemoveItemsFromRomOfChildImpl();
|
||||||
RemoveItemsFromRomOfChildImpl(false);
|
RemoveItemsFromRomOfChildImplDB();
|
||||||
RemoveItemsFromRomOfChildImplDB(false);
|
|
||||||
RemoveItemsFromRomOfChildImpl(true);
|
|
||||||
RemoveItemsFromRomOfChildImplDB(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1192,14 +1189,13 @@ namespace SabreTools.DatFiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use romof tags to remove bios items from children
|
/// Use romof tags to remove items from children
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bios">True if only child Bios sets are touched, false for non-bios sets</param>
|
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Applies to <see cref="Items"/>.
|
/// Applies to <see cref="Items"/>.
|
||||||
/// Assumes items are bucketed by <see cref="ItemKey.Machine"/>.
|
/// Assumes items are bucketed by <see cref="ItemKey.Machine"/>.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
private void RemoveItemsFromRomOfChildImpl(bool bios)
|
private void RemoveItemsFromRomOfChildImpl()
|
||||||
{
|
{
|
||||||
// Loop through the romof tags
|
// Loop through the romof tags
|
||||||
List<string> buckets = [.. Items.Keys];
|
List<string> buckets = [.. Items.Keys];
|
||||||
@@ -1217,10 +1213,6 @@ namespace SabreTools.DatFiles
|
|||||||
if (machine == null)
|
if (machine == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// If the game (is/is not) a bios, we want to continue
|
|
||||||
if (bios ^ (machine.GetBoolFieldValue(Models.Metadata.Machine.IsBiosKey) == true))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Get the romof parent items
|
// Get the romof parent items
|
||||||
string? romOf = machine.GetStringFieldValue(Models.Metadata.Machine.RomOfKey);
|
string? romOf = machine.GetStringFieldValue(Models.Metadata.Machine.RomOfKey);
|
||||||
List<DatItem> parentItems = GetItemsForBucket(romOf);
|
List<DatItem> parentItems = GetItemsForBucket(romOf);
|
||||||
@@ -1247,7 +1239,7 @@ namespace SabreTools.DatFiles
|
|||||||
/// Applies to <see cref="ItemsDB"/>.
|
/// Applies to <see cref="ItemsDB"/>.
|
||||||
/// Assumes items are bucketed by <see cref="ItemKey.Machine"/>.
|
/// Assumes items are bucketed by <see cref="ItemKey.Machine"/>.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
private void RemoveItemsFromRomOfChildImplDB(bool bios)
|
private void RemoveItemsFromRomOfChildImplDB()
|
||||||
{
|
{
|
||||||
// Loop through the romof tags
|
// Loop through the romof tags
|
||||||
List<string> buckets = [.. ItemsDB.SortedKeys];
|
List<string> buckets = [.. ItemsDB.SortedKeys];
|
||||||
@@ -1263,10 +1255,6 @@ namespace SabreTools.DatFiles
|
|||||||
if (machine.Value == null)
|
if (machine.Value == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// If the game (is/is not) a bios, we want to continue
|
|
||||||
if (bios ^ (machine.Value.GetBoolFieldValue(Models.Metadata.Machine.IsBiosKey) == true))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Get the romof parent items
|
// Get the romof parent items
|
||||||
string? romOf = machine.Value.GetStringFieldValue(Models.Metadata.Machine.RomOfKey);
|
string? romOf = machine.Value.GetStringFieldValue(Models.Metadata.Machine.RomOfKey);
|
||||||
Dictionary<long, DatItem> parentItems = GetItemsForBucketDB(romOf);
|
Dictionary<long, DatItem> parentItems = GetItemsForBucketDB(romOf);
|
||||||
|
|||||||
Reference in New Issue
Block a user