Stop using "Rom" terminology

This commit is contained in:
Matt Nadareski
2025-01-13 10:45:42 -05:00
parent 91c2fce12b
commit 5a451dd1ac
2 changed files with 69 additions and 69 deletions

View File

@@ -12,44 +12,44 @@ namespace SabreTools.DatFiles
#region Splitting #region Splitting
/// <summary> /// <summary>
/// Use romof tags to add roms to the children /// Use romof tags to add items to the children
/// </summary> /// </summary>
public void AddRomsFromBios() public void AddItemsFromBios()
{ {
AddRomsFromBiosImpl(); AddItemsFromBiosImpl();
AddRomsFromBiosImplDB(); AddItemsFromBiosImplDB();
} }
/// <summary> /// <summary>
/// Use cloneof tags to add roms to the parents, removing the child sets in the process /// Use cloneof tags to add items to the parents, removing the child sets in the process
/// </summary> /// </summary>
/// <param name="subfolder">True to add DatItems to subfolder of parent (not including Disk), false otherwise</param> /// <param name="subfolder">True to add DatItems to subfolder of parent (not including Disk), false otherwise</param>
/// <param name="skipDedup">True to skip checking for duplicate ROMs in parent, false otherwise</param> /// <param name="skipDedup">True to skip checking for duplicate ROMs in parent, false otherwise</param>
public void AddRomsFromChildren(bool subfolder, bool skipDedup) public void AddItemsFromChildren(bool subfolder, bool skipDedup)
{ {
AddRomsFromChildrenImpl(subfolder, skipDedup); AddItemsFromChildrenImpl(subfolder, skipDedup);
AddRomsFromChildrenImplDB(subfolder, skipDedup); AddItemsFromChildrenImplDB(subfolder, skipDedup);
} }
/// <summary> /// <summary>
/// Use device_ref and optionally slotoption tags to add roms to the children /// Use device_ref and optionally slotoption tags to add items to the children
/// </summary> /// </summary>
/// <param name="dev">True if only child device sets are touched, false for non-device sets</param> /// <param name="dev">True if only child device sets are touched, false for non-device sets</param>
/// <param name="useSlotOptions">True if slotoptions tags are used as well, false otherwise</param> /// <param name="useSlotOptions">True if slotoptions tags are used as well, false otherwise</param>
public bool AddRomsFromDevices(bool dev, bool useSlotOptions) public bool AddItemsFromDevices(bool dev, bool useSlotOptions)
{ {
bool foundnew = AddRomsFromDevicesImpl(dev, useSlotOptions); bool foundnew = AddItemsFromDevicesImpl(dev, useSlotOptions);
foundnew |= AddRomsFromDevicesImplDB(dev, useSlotOptions); foundnew |= AddItemsFromDevicesImplDB(dev, useSlotOptions);
return foundnew; return foundnew;
} }
/// <summary> /// <summary>
/// Use cloneof tags to add roms to the children, setting the new romof tag in the process /// Use cloneof tags to add items to the children, setting the new romof tag in the process
/// </summary> /// </summary>
public void AddRomsFromParent() public void AddItemsFromParent()
{ {
AddRomsFromParentImpl(); AddItemsFromParentImpl();
AddRomsFromParentImplDB(); AddItemsFromParentImplDB();
} }
/// <summary> /// <summary>
@@ -62,26 +62,26 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use romof tags to remove bios roms from children /// Use romof tags to remove bios items from children
/// </summary> /// </summary>
/// <param name="bios">True if only child Bios sets are touched, false for non-bios sets</param> /// <param name="bios">True if only child Bios sets are touched, false for non-bios sets</param>
public void RemoveBiosRomsFromChild(bool bios) public void RemoveBiosItemsFromChild(bool bios)
{ {
RemoveBiosRomsFromChildImpl(bios); RemoveBiosItemsFromChildImpl(bios);
RemoveBiosRomsFromChildImplDB(bios); RemoveBiosItemsFromChildImplDB(bios);
} }
/// <summary> /// <summary>
/// Use cloneof tags to remove roms from the children /// Use cloneof tags to remove items from the children
/// </summary> /// </summary>
public void RemoveRomsFromChild() public void RemoveItemsFromChild()
{ {
RemoveRomsFromChildImpl(); RemoveItemsFromChildImpl();
RemoveRomsFromChildImplDB(); RemoveItemsFromChildImplDB();
} }
/// <summary> /// <summary>
/// Remove all romof and cloneof tags from all games /// Remove all romof and cloneof tags from all machines
/// </summary> /// </summary>
public void RemoveMachineRelationshipTags() public void RemoveMachineRelationshipTags()
{ {
@@ -94,13 +94,13 @@ namespace SabreTools.DatFiles
#region Splitting Implementations #region Splitting Implementations
/// <summary> /// <summary>
/// Use romof tags to add roms to the children /// Use romof tags to add items to the children
/// </summary> /// </summary>
/// <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 AddRomsFromBiosImpl() private void AddItemsFromBiosImpl()
{ {
List<string> buckets = [.. Items.Keys]; List<string> buckets = [.. Items.Keys];
buckets.Sort(); buckets.Sort();
@@ -140,13 +140,13 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use romof tags to add roms to the children /// Use romof tags to add items to the children
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 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 AddRomsFromBiosImplDB() private void AddItemsFromBiosImplDB()
{ {
List<string> buckets = [.. ItemsDB.SortedKeys]; List<string> buckets = [.. ItemsDB.SortedKeys];
foreach (string bucket in buckets) foreach (string bucket in buckets)
@@ -188,7 +188,7 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use cloneof tags to add roms to the parents, removing the child sets in the process /// Use cloneof tags to add items to the parents, removing the child sets in the process
/// </summary> /// </summary>
/// <param name="subfolder">True to add DatItems to subfolder of parent (not including Disk), false otherwise</param> /// <param name="subfolder">True to add DatItems to subfolder of parent (not including Disk), false otherwise</param>
/// <param name="skipDedup">True to skip checking for duplicate ROMs in parent, false otherwise</param> /// <param name="skipDedup">True to skip checking for duplicate ROMs in parent, false otherwise</param>
@@ -196,7 +196,7 @@ namespace SabreTools.DatFiles
/// 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 AddRomsFromChildrenImpl(bool subfolder, bool skipDedup) private void AddItemsFromChildrenImpl(bool subfolder, bool skipDedup)
{ {
List<string> buckets = [.. Items.Keys]; List<string> buckets = [.. Items.Keys];
buckets.Sort(); buckets.Sort();
@@ -320,7 +320,7 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use cloneof tags to add roms to the parents, removing the child sets in the process /// Use cloneof tags to add items to the parents, removing the child sets in the process
/// </summary> /// </summary>
/// <param name="subfolder">True to add DatItems to subfolder of parent (not including Disk), false otherwise</param> /// <param name="subfolder">True to add DatItems to subfolder of parent (not including Disk), false otherwise</param>
/// <param name="skipDedup">True to skip checking for duplicate ROMs in parent, false otherwise</param> /// <param name="skipDedup">True to skip checking for duplicate ROMs in parent, false otherwise</param>
@@ -328,7 +328,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 AddRomsFromChildrenImplDB(bool subfolder, bool skipDedup) private void AddItemsFromChildrenImplDB(bool subfolder, bool skipDedup)
{ {
List<string> buckets = [.. ItemsDB.SortedKeys]; List<string> buckets = [.. ItemsDB.SortedKeys];
foreach (string bucket in buckets) foreach (string bucket in buckets)
@@ -453,7 +453,7 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use device_ref and optionally slotoption tags to add roms to the children /// Use device_ref and optionally slotoption tags to add items to the children
/// </summary> /// </summary>
/// <param name="dev">True if only child device sets are touched, false for non-device sets (default)</param> /// <param name="dev">True if only child device sets are touched, false for non-device sets (default)</param>
/// <param name="useSlotOptions">True if slotoptions tags are used as well, false otherwise</param> /// <param name="useSlotOptions">True if slotoptions tags are used as well, false otherwise</param>
@@ -462,7 +462,7 @@ namespace SabreTools.DatFiles
/// 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 bool AddRomsFromDevicesImpl(bool dev, bool useSlotOptions) private bool AddItemsFromDevicesImpl(bool dev, bool useSlotOptions)
{ {
bool foundnew = false; bool foundnew = false;
List<string> buckets = [.. Items.Keys]; List<string> buckets = [.. Items.Keys];
@@ -609,7 +609,7 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use device_ref and optionally slotoption tags to add roms to the children /// Use device_ref and optionally slotoption tags to add items to the children
/// </summary> /// </summary>
/// <param name="dev">True if only child device sets are touched, false for non-device sets</param> /// <param name="dev">True if only child device sets are touched, false for non-device sets</param>
/// <param name="useSlotOptions">True if slotoptions tags are used as well, false otherwise</param> /// <param name="useSlotOptions">True if slotoptions tags are used as well, false otherwise</param>
@@ -618,7 +618,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 bool AddRomsFromDevicesImplDB(bool dev, bool useSlotOptions) private bool AddItemsFromDevicesImplDB(bool dev, bool useSlotOptions)
{ {
bool foundnew = false; bool foundnew = false;
List<string> buckets = [.. ItemsDB.SortedKeys]; List<string> buckets = [.. ItemsDB.SortedKeys];
@@ -778,13 +778,13 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use cloneof tags to add roms to the children, setting the new romof tag in the process /// Use cloneof tags to add items to the children, setting the new romof tag in the process
/// </summary> /// </summary>
/// <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 AddRomsFromParentImpl() private void AddItemsFromParentImpl()
{ {
List<string> buckets = [.. Items.Keys]; List<string> buckets = [.. Items.Keys];
buckets.Sort(); buckets.Sort();
@@ -835,13 +835,13 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use cloneof tags to add roms to the children, setting the new romof tag in the process /// Use cloneof tags to add items to the children, setting the new romof tag in the process
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 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 AddRomsFromParentImplDB() private void AddItemsFromParentImplDB()
{ {
List<string> buckets = [.. ItemsDB.SortedKeys]; List<string> buckets = [.. ItemsDB.SortedKeys];
foreach (string bucket in buckets) foreach (string bucket in buckets)
@@ -967,14 +967,14 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use romof tags to remove bios roms from children /// Use romof tags to remove bios items from children
/// </summary> /// </summary>
/// <param name="bios">True if only child Bios sets are touched, false for non-bios sets</param> /// <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 RemoveBiosRomsFromChildImpl(bool bios) private void RemoveBiosItemsFromChildImpl(bool bios)
{ {
// Loop through the romof tags // Loop through the romof tags
List<string> buckets = [.. Items.Keys]; List<string> buckets = [.. Items.Keys];
@@ -1019,14 +1019,14 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use romof tags to remove bios roms from children /// Use romof tags to remove bios items from children
/// </summary> /// </summary>
/// <param name="bios">True if only child Bios sets are touched, false for non-bios sets</param> /// <param name="bios">True if only child Bios sets are touched, false for non-bios sets</param>
/// <remarks> /// <remarks>
/// 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 RemoveBiosRomsFromChildImplDB(bool bios) private void RemoveBiosItemsFromChildImplDB(bool bios)
{ {
// Loop through the romof tags // Loop through the romof tags
List<string> buckets = [.. ItemsDB.SortedKeys]; List<string> buckets = [.. ItemsDB.SortedKeys];
@@ -1069,13 +1069,13 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use cloneof tags to remove roms from the children /// Use cloneof tags to remove items from the children
/// </summary> /// </summary>
/// <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 RemoveRomsFromChildImpl() private void RemoveItemsFromChildImpl()
{ {
List<string> buckets = [.. Items.Keys]; List<string> buckets = [.. Items.Keys];
buckets.Sort(); buckets.Sort();
@@ -1123,13 +1123,13 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Use cloneof tags to remove roms from the children /// Use cloneof tags to remove items from the children
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 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 RemoveRomsFromChildImplDB() private void RemoveItemsFromChildImplDB()
{ {
List<string> buckets = [.. ItemsDB.SortedKeys]; List<string> buckets = [.. ItemsDB.SortedKeys];
foreach (string bucket in buckets) foreach (string bucket in buckets)
@@ -1183,7 +1183,7 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Remove all romof and cloneof tags from all games /// Remove all romof and cloneof tags from all machines
/// </summary> /// </summary>
/// <remarks>Applies to <see cref="Items"/></remarks> /// <remarks>Applies to <see cref="Items"/></remarks>
private void RemoveMachineRelationshipTagsImpl() private void RemoveMachineRelationshipTagsImpl()
@@ -1213,7 +1213,7 @@ namespace SabreTools.DatFiles
} }
/// <summary> /// <summary>
/// Remove all romof and cloneof tags from all games /// Remove all romof and cloneof tags from all machines
/// </summary> /// </summary>
/// <remarks>Applies to <see cref="ItemsDB"/></remarks> /// <remarks>Applies to <see cref="ItemsDB"/></remarks>
private void RemoveMachineRelationshipTagsImplDB() private void RemoveMachineRelationshipTagsImplDB()

View File

@@ -105,8 +105,8 @@ namespace SabreTools.DatTools
datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true); datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
// Now we want to loop through all of the games and set the correct information // Now we want to loop through all of the games and set the correct information
while (datFile.AddRomsFromDevices(false, false)) ; while (datFile.AddItemsFromDevices(false, false)) ;
while (datFile.AddRomsFromDevices(true, false)) ; while (datFile.AddItemsFromDevices(true, false)) ;
// Then, remove the romof and cloneof tags so it's not picked up by the manager // Then, remove the romof and cloneof tags so it's not picked up by the manager
datFile.RemoveMachineRelationshipTags(); datFile.RemoveMachineRelationshipTags();
@@ -124,11 +124,11 @@ namespace SabreTools.DatTools
datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true); datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
// Now we want to loop through all of the games and set the correct information // Now we want to loop through all of the games and set the correct information
datFile.AddRomsFromChildren(true, false); datFile.AddItemsFromChildren(true, false);
// Now that we have looped through the cloneof tags, we loop through the romof tags // Now that we have looped through the cloneof tags, we loop through the romof tags
datFile.RemoveBiosRomsFromChild(false); datFile.RemoveBiosItemsFromChild(false);
datFile.RemoveBiosRomsFromChild(true); datFile.RemoveBiosItemsFromChild(true);
// Finally, remove the romof and cloneof tags so it's not picked up by the manager // Finally, remove the romof and cloneof tags so it's not picked up by the manager
datFile.RemoveMachineRelationshipTags(); datFile.RemoveMachineRelationshipTags();
@@ -146,12 +146,12 @@ namespace SabreTools.DatTools
datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true); datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
// Now we want to loop through all of the games and set the correct information // Now we want to loop through all of the games and set the correct information
while (datFile.AddRomsFromDevices(true, true)) ; while (datFile.AddItemsFromDevices(true, true)) ;
datFile.AddRomsFromDevices(false, true); datFile.AddItemsFromDevices(false, true);
datFile.AddRomsFromParent(); datFile.AddItemsFromParent();
// Now that we have looped through the cloneof tags, we loop through the romof tags // Now that we have looped through the cloneof tags, we loop through the romof tags
datFile.AddRomsFromBios(); datFile.AddItemsFromBios();
// Then, remove the romof and cloneof tags so it's not picked up by the manager // Then, remove the romof and cloneof tags so it's not picked up by the manager
datFile.RemoveMachineRelationshipTags(); datFile.RemoveMachineRelationshipTags();
@@ -169,11 +169,11 @@ namespace SabreTools.DatTools
datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true); datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
// Now we want to loop through all of the games and set the correct information // Now we want to loop through all of the games and set the correct information
datFile.AddRomsFromChildren(true, true); datFile.AddItemsFromChildren(true, true);
// Now that we have looped through the cloneof tags, we loop through the romof tags // Now that we have looped through the cloneof tags, we loop through the romof tags
datFile.RemoveBiosRomsFromChild(false); datFile.RemoveBiosItemsFromChild(false);
datFile.RemoveBiosRomsFromChild(true); datFile.RemoveBiosItemsFromChild(true);
// Finally, remove the romof and cloneof tags so it's not picked up by the manager // Finally, remove the romof and cloneof tags so it's not picked up by the manager
datFile.RemoveMachineRelationshipTags(); datFile.RemoveMachineRelationshipTags();
@@ -191,11 +191,11 @@ namespace SabreTools.DatTools
datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true); datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
// Now we want to loop through all of the games and set the correct information // Now we want to loop through all of the games and set the correct information
datFile.AddRomsFromParent(); datFile.AddItemsFromParent();
// Now that we have looped through the cloneof tags, we loop through the romof tags // Now that we have looped through the cloneof tags, we loop through the romof tags
datFile.RemoveBiosRomsFromChild(false); datFile.RemoveBiosItemsFromChild(false);
datFile.RemoveBiosRomsFromChild(true); datFile.RemoveBiosItemsFromChild(true);
// Finally, remove the romof and cloneof tags so it's not picked up by the manager // Finally, remove the romof and cloneof tags so it's not picked up by the manager
datFile.RemoveMachineRelationshipTags(); datFile.RemoveMachineRelationshipTags();
@@ -213,11 +213,11 @@ namespace SabreTools.DatTools
datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true); datFile.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
// Now we want to loop through all of the games and set the correct information // Now we want to loop through all of the games and set the correct information
datFile.RemoveRomsFromChild(); datFile.RemoveItemsFromChild();
// Now that we have looped through the cloneof tags, we loop through the romof tags // Now that we have looped through the cloneof tags, we loop through the romof tags
datFile.RemoveBiosRomsFromChild(false); datFile.RemoveBiosItemsFromChild(false);
datFile.RemoveBiosRomsFromChild(true); datFile.RemoveBiosItemsFromChild(true);
// Finally, remove the romof and cloneof tags so it's not picked up by the manager // Finally, remove the romof and cloneof tags so it's not picked up by the manager
datFile.RemoveMachineRelationshipTags(); datFile.RemoveMachineRelationshipTags();