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>
|
||||
internal void RemoveItemsFromRomOfChild()
|
||||
{
|
||||
// TODO: Figure out why the bios flag is needed
|
||||
RemoveItemsFromRomOfChildImpl(false);
|
||||
RemoveItemsFromRomOfChildImplDB(false);
|
||||
RemoveItemsFromRomOfChildImpl(true);
|
||||
RemoveItemsFromRomOfChildImplDB(true);
|
||||
RemoveItemsFromRomOfChildImpl();
|
||||
RemoveItemsFromRomOfChildImplDB();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1192,14 +1189,13 @@ namespace SabreTools.DatFiles
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use romof tags to remove bios items from children
|
||||
/// Use romof tags to remove items from children
|
||||
/// </summary>
|
||||
/// <param name="bios">True if only child Bios sets are touched, false for non-bios sets</param>
|
||||
/// <remarks>
|
||||
/// Applies to <see cref="Items"/>.
|
||||
/// Assumes items are bucketed by <see cref="ItemKey.Machine"/>.
|
||||
/// </remarks>
|
||||
private void RemoveItemsFromRomOfChildImpl(bool bios)
|
||||
private void RemoveItemsFromRomOfChildImpl()
|
||||
{
|
||||
// Loop through the romof tags
|
||||
List<string> buckets = [.. Items.Keys];
|
||||
@@ -1217,10 +1213,6 @@ namespace SabreTools.DatFiles
|
||||
if (machine == null)
|
||||
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
|
||||
string? romOf = machine.GetStringFieldValue(Models.Metadata.Machine.RomOfKey);
|
||||
List<DatItem> parentItems = GetItemsForBucket(romOf);
|
||||
@@ -1247,7 +1239,7 @@ namespace SabreTools.DatFiles
|
||||
/// Applies to <see cref="ItemsDB"/>.
|
||||
/// Assumes items are bucketed by <see cref="ItemKey.Machine"/>.
|
||||
/// </remarks>
|
||||
private void RemoveItemsFromRomOfChildImplDB(bool bios)
|
||||
private void RemoveItemsFromRomOfChildImplDB()
|
||||
{
|
||||
// Loop through the romof tags
|
||||
List<string> buckets = [.. ItemsDB.SortedKeys];
|
||||
@@ -1263,10 +1255,6 @@ namespace SabreTools.DatFiles
|
||||
if (machine.Value == null)
|
||||
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
|
||||
string? romOf = machine.Value.GetStringFieldValue(Models.Metadata.Machine.RomOfKey);
|
||||
Dictionary<long, DatItem> parentItems = GetItemsForBucketDB(romOf);
|
||||
|
||||
Reference in New Issue
Block a user