mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix misleading comments around copying information
This commit is contained in:
@@ -810,7 +810,7 @@ namespace SabreTools.DatFiles
|
|||||||
var savedMachine = _machines[_itemToMachineMapping[savedIndex]];
|
var savedMachine = _machines[_itemToMachineMapping[savedIndex]];
|
||||||
var itemMachine = _machines[_itemToMachineMapping[itemIndex]];
|
var itemMachine = _machines[_itemToMachineMapping[itemIndex]];
|
||||||
|
|
||||||
// If the current system has a lower ID than the previous, set the system accordingly
|
// If the current source has a lower ID than the saved, use the saved source
|
||||||
if (itemSource?.Index < savedSource?.Index)
|
if (itemSource?.Index < savedSource?.Index)
|
||||||
{
|
{
|
||||||
_itemToSourceMapping[itemIndex] = _itemToSourceMapping[savedIndex];
|
_itemToSourceMapping[itemIndex] = _itemToSourceMapping[savedIndex];
|
||||||
@@ -818,7 +818,7 @@ namespace SabreTools.DatFiles
|
|||||||
savedItem.SetName(datItem.GetName());
|
savedItem.SetName(datItem.GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the current machine is a child of the new machine, use the new machine instead
|
// If the saved machine is a child of the current machine, use the current machine instead
|
||||||
if (savedMachine.GetStringFieldValue(Models.Metadata.Machine.CloneOfKey) == itemMachine.GetStringFieldValue(Models.Metadata.Machine.NameKey)
|
if (savedMachine.GetStringFieldValue(Models.Metadata.Machine.CloneOfKey) == itemMachine.GetStringFieldValue(Models.Metadata.Machine.NameKey)
|
||||||
|| savedMachine.GetStringFieldValue(Models.Metadata.Machine.RomOfKey) == itemMachine.GetStringFieldValue(Models.Metadata.Machine.NameKey))
|
|| savedMachine.GetStringFieldValue(Models.Metadata.Machine.RomOfKey) == itemMachine.GetStringFieldValue(Models.Metadata.Machine.NameKey))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ namespace SabreTools.DatItems
|
|||||||
var savedMachine = savedItem.GetFieldValue<Machine>(DatItem.MachineKey);
|
var savedMachine = savedItem.GetFieldValue<Machine>(DatItem.MachineKey);
|
||||||
var itemMachine = datItem.GetFieldValue<Machine>(DatItem.MachineKey);
|
var itemMachine = datItem.GetFieldValue<Machine>(DatItem.MachineKey);
|
||||||
|
|
||||||
// If the current system has a lower ID than the previous, set the system accordingly
|
// If the current source has a lower ID than the saved, use the saved source
|
||||||
if (itemSource?.Index < savedSource?.Index)
|
if (itemSource?.Index < savedSource?.Index)
|
||||||
{
|
{
|
||||||
datItem.SetFieldValue<Source?>(DatItem.SourceKey, savedSource.Clone() as Source);
|
datItem.SetFieldValue<Source?>(DatItem.SourceKey, savedSource.Clone() as Source);
|
||||||
@@ -353,7 +353,7 @@ namespace SabreTools.DatItems
|
|||||||
savedItem.SetName(datItem.GetName());
|
savedItem.SetName(datItem.GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the current machine is a child of the new machine, use the new machine instead
|
// If the saved machine is a child of the current machine, use the current machine instead
|
||||||
if (savedMachine?.GetStringFieldValue(Models.Metadata.Machine.CloneOfKey) == itemMachine?.GetStringFieldValue(Models.Metadata.Machine.NameKey)
|
if (savedMachine?.GetStringFieldValue(Models.Metadata.Machine.CloneOfKey) == itemMachine?.GetStringFieldValue(Models.Metadata.Machine.NameKey)
|
||||||
|| savedMachine?.GetStringFieldValue(Models.Metadata.Machine.RomOfKey) == itemMachine?.GetStringFieldValue(Models.Metadata.Machine.NameKey))
|
|| savedMachine?.GetStringFieldValue(Models.Metadata.Machine.RomOfKey) == itemMachine?.GetStringFieldValue(Models.Metadata.Machine.NameKey))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user