diff --git a/SabreTools.DatFiles/ItemDictionaryDB.cs b/SabreTools.DatFiles/ItemDictionaryDB.cs
index 3e20eb46..5ea8a075 100644
--- a/SabreTools.DatFiles/ItemDictionaryDB.cs
+++ b/SabreTools.DatFiles/ItemDictionaryDB.cs
@@ -116,6 +116,22 @@ namespace SabreTools.DatFiles
return _machineIndex - 1;
}
+ ///
+ /// Remove all items marked for removal
+ ///
+ public void ClearMarked()
+ {
+ var itemIndices = _items.Keys;
+ foreach (long itemIndex in itemIndices)
+ {
+ var datItem = _items[itemIndex];
+ if (datItem == null || datItem.GetBoolFieldValue(DatItem.RemoveKey) != true)
+ continue;
+
+ RemoveItem(itemIndex);
+ }
+ }
+
///
/// Get an item based on the index
///