mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix missing Archive field updates
This commit is contained in:
@@ -535,6 +535,20 @@ namespace SabreTools.Core.Tools
|
|||||||
case "analog_mask":
|
case "analog_mask":
|
||||||
return DatItemField.Analog_Mask;
|
return DatItemField.Analog_Mask;
|
||||||
|
|
||||||
|
// Archive
|
||||||
|
case "number":
|
||||||
|
return DatItemField.Number;
|
||||||
|
|
||||||
|
case "clone":
|
||||||
|
return DatItemField.Clone;
|
||||||
|
|
||||||
|
case "regparent":
|
||||||
|
case "reg_parent":
|
||||||
|
return DatItemField.RegParent;
|
||||||
|
|
||||||
|
case "languages":
|
||||||
|
return DatItemField.Languages;
|
||||||
|
|
||||||
// BiosSet
|
// BiosSet
|
||||||
case "description":
|
case "description":
|
||||||
case "biosdescription":
|
case "biosdescription":
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ namespace SabreTools.DatFiles
|
|||||||
|
|
||||||
if (datItem is Adjuster) SetFields(datItem as Adjuster);
|
if (datItem is Adjuster) SetFields(datItem as Adjuster);
|
||||||
else if (datItem is Analog) SetFields(datItem as Analog);
|
else if (datItem is Analog) SetFields(datItem as Analog);
|
||||||
|
else if (datItem is Archive) SetFields(datItem as Archive);
|
||||||
else if (datItem is BiosSet) SetFields(datItem as BiosSet);
|
else if (datItem is BiosSet) SetFields(datItem as BiosSet);
|
||||||
else if (datItem is Chip) SetFields(datItem as Chip);
|
else if (datItem is Chip) SetFields(datItem as Chip);
|
||||||
else if (datItem is Condition) SetFields(datItem as Condition);
|
else if (datItem is Condition) SetFields(datItem as Condition);
|
||||||
@@ -459,6 +460,28 @@ namespace SabreTools.DatFiles
|
|||||||
analog.Mask = DatItemMappings[DatItemField.Analog_Mask];
|
analog.Mask = DatItemMappings[DatItemField.Analog_Mask];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set fields with given values
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="archive">Archive to remove replace fields in</param>
|
||||||
|
private void SetFields(Archive archive)
|
||||||
|
{
|
||||||
|
if (DatItemMappings.Keys.Contains(DatItemField.Number))
|
||||||
|
analog.Number = DatItemMappings[DatItemField.Number];
|
||||||
|
|
||||||
|
if (DatItemMappings.Keys.Contains(DatItemField.Clone))
|
||||||
|
analog.Clone = DatItemMappings[DatItemField.Clone];
|
||||||
|
|
||||||
|
if (DatItemMappings.Keys.Contains(DatItemField.RegParent))
|
||||||
|
analog.RegParent = DatItemMappings[DatItemField.RegParent];
|
||||||
|
|
||||||
|
if (DatItemMappings.Keys.Contains(DatItemField.Region))
|
||||||
|
analog.Region = DatItemMappings[DatItemField.Region];
|
||||||
|
|
||||||
|
if (DatItemMappings.Keys.Contains(DatItemField.Languages))
|
||||||
|
analog.Languages = DatItemMappings[DatItemField.Languages];
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set fields with given values
|
/// Set fields with given values
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user