mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add explicit list of supported types
This commit is contained in:
@@ -2339,7 +2339,6 @@ namespace SabreTools.Library.DatFiles
|
||||
|
||||
#endregion
|
||||
|
||||
// TODO: See if any of the helper methods can be broken up a bit more neatly
|
||||
#region Rebuilding and Verifying
|
||||
|
||||
/// <summary>
|
||||
@@ -3777,6 +3776,15 @@ namespace SabreTools.Library.DatFiles
|
||||
return rom;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get supported types for write
|
||||
/// </summary>
|
||||
/// <returns>List of supported types for writing</returns>
|
||||
protected virtual ItemType[] GetSupportedTypes()
|
||||
{
|
||||
return Enum.GetValues(typeof(ItemType)) as ItemType[];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get if an item should be ignored on write
|
||||
/// </summary>
|
||||
@@ -3803,6 +3811,10 @@ namespace SabreTools.Library.DatFiles
|
||||
return true;
|
||||
}
|
||||
|
||||
// If we have an item type not in the list of supported values
|
||||
if (!GetSupportedTypes().Contains(datItem.ItemType))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user