mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Remove unnecessary check in rebuilding
This commit is contained in:
@@ -438,11 +438,12 @@ namespace SabreTools.DatTools
|
|||||||
foreach (DatItem item in dupes)
|
foreach (DatItem item in dupes)
|
||||||
{
|
{
|
||||||
// If we don't have a proper machine
|
// If we don't have a proper machine
|
||||||
if (item.GetFieldValue<Machine>(DatItem.MachineKey)!?.GetStringFieldValue(Models.Metadata.Machine.NameKey) == null || !datFile.Items.ContainsKey(item.GetFieldValue<Machine>(DatItem.MachineKey)!.GetStringFieldValue(Models.Metadata.Machine.NameKey)!))
|
var machine = item.GetFieldValue<Machine>(DatItem.MachineKey);
|
||||||
|
if (machine?.GetStringFieldValue(Models.Metadata.Machine.NameKey) == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// If we should check for the items in the machine
|
// If we should check for the items in the machine
|
||||||
var items = datFile.Items[item.GetFieldValue<Machine>(DatItem.MachineKey)!.GetStringFieldValue(Models.Metadata.Machine.NameKey)!];
|
var items = datFile.Items[machine.GetStringFieldValue(Models.Metadata.Machine.NameKey)!];
|
||||||
if (shouldCheck && items!.Count > 1)
|
if (shouldCheck && items!.Count > 1)
|
||||||
outputFormat = OutputFormat.Folder;
|
outputFormat = OutputFormat.Folder;
|
||||||
else if (shouldCheck && items!.Count == 1)
|
else if (shouldCheck && items!.Count == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user