mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Promote DataArea, DiskArea, and Part
This commit is contained in:
@@ -51,11 +51,11 @@ namespace SabreTools.Library.DatItems
|
||||
base.SetFields(mappings);
|
||||
|
||||
// Handle PartFeature-specific fields
|
||||
if (mappings.Keys.Contains(Field.DatItem_Name))
|
||||
Name = mappings[Field.DatItem_Name];
|
||||
if (mappings.Keys.Contains(Field.DatItem_Part_Feature_Name))
|
||||
Name = mappings[Field.DatItem_Part_Feature_Name];
|
||||
|
||||
if (mappings.Keys.Contains(Field.DatItem_Value))
|
||||
Value = mappings[Field.DatItem_Value];
|
||||
if (mappings.Keys.Contains(Field.DatItem_Part_Feature_Value))
|
||||
Value = mappings[Field.DatItem_Part_Feature_Value];
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -151,15 +151,15 @@ namespace SabreTools.Library.DatItems
|
||||
return false;
|
||||
|
||||
// Filter on item name
|
||||
if (filter.DatItem_Name.MatchesPositiveSet(Name) == false)
|
||||
if (filter.DatItem_Part_Feature_Name.MatchesPositiveSet(Name) == false)
|
||||
return false;
|
||||
if (filter.DatItem_Name.MatchesNegativeSet(Name) == true)
|
||||
if (filter.DatItem_Part_Feature_Name.MatchesNegativeSet(Name) == true)
|
||||
return false;
|
||||
|
||||
// Filter on info value
|
||||
if (filter.DatItem_Value.MatchesPositiveSet(Value) == false)
|
||||
if (filter.DatItem_Part_Feature_Value.MatchesPositiveSet(Value) == false)
|
||||
return false;
|
||||
if (filter.DatItem_Value.MatchesNegativeSet(Value) == true)
|
||||
if (filter.DatItem_Part_Feature_Value.MatchesNegativeSet(Value) == true)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -175,10 +175,10 @@ namespace SabreTools.Library.DatItems
|
||||
base.RemoveFields(fields);
|
||||
|
||||
// Remove the fields
|
||||
if (fields.Contains(Field.DatItem_Name))
|
||||
if (fields.Contains(Field.DatItem_Part_Feature_Name))
|
||||
Name = null;
|
||||
|
||||
if (fields.Contains(Field.DatItem_Value))
|
||||
if (fields.Contains(Field.DatItem_Part_Feature_Value))
|
||||
Value = null;
|
||||
}
|
||||
|
||||
@@ -214,10 +214,10 @@ namespace SabreTools.Library.DatItems
|
||||
PartFeature newItem = item as PartFeature;
|
||||
|
||||
// Replace the fields
|
||||
if (fields.Contains(Field.DatItem_Name))
|
||||
if (fields.Contains(Field.DatItem_Part_Feature_Name))
|
||||
Name = newItem.Name;
|
||||
|
||||
if (fields.Contains(Field.DatItem_Value))
|
||||
if (fields.Contains(Field.DatItem_Part_Feature_Value))
|
||||
Value = newItem.Value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user