mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add more passthrough DB methods
This commit is contained in:
@@ -467,7 +467,7 @@ namespace SabreTools.DatFiles
|
||||
parents[key].Remove(machine);
|
||||
|
||||
// Remove the rest of the items from this key
|
||||
parents[key].ForEach(k => ItemsDB.RemoveMachine(k));
|
||||
parents[key].ForEach(k => RemoveMachineDB(k));
|
||||
}
|
||||
|
||||
// Finally, strip out the parent tags
|
||||
|
||||
@@ -485,7 +485,7 @@ namespace SabreTools.DatFiles
|
||||
}
|
||||
|
||||
// Remove the current item
|
||||
ItemsDB.RemoveItem(item.Key);
|
||||
RemoveItemDB(item.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1059,12 +1059,12 @@ namespace SabreTools.DatFiles
|
||||
{
|
||||
foreach (var key in items.Keys)
|
||||
{
|
||||
ItemsDB.RemoveItem(key);
|
||||
RemoveItemDB(key);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the machine
|
||||
ItemsDB.RemoveMachine(machine.Key);
|
||||
RemoveMachineDB(machine.Key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1149,7 +1149,7 @@ namespace SabreTools.DatFiles
|
||||
var matchedItems = items.Where(i => i.Value.Equals(item.Value));
|
||||
foreach (var match in matchedItems)
|
||||
{
|
||||
ItemsDB.RemoveItem(match.Key);
|
||||
RemoveItemDB(match.Key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1247,7 +1247,7 @@ namespace SabreTools.DatFiles
|
||||
var matchedItems = items.Where(i => i.Value.Equals(item.Value));
|
||||
foreach (var match in matchedItems)
|
||||
{
|
||||
ItemsDB.RemoveItem(match.Key);
|
||||
RemoveItemDB(match.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,6 +282,30 @@ namespace SabreTools.DatFiles
|
||||
return Items.RemoveItem(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove an item, returning if it could be removed
|
||||
/// </summary>
|
||||
public bool RemoveItemDB(long itemIndex)
|
||||
{
|
||||
return ItemsDB.RemoveItem(itemIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove a machine, returning if it could be removed
|
||||
/// </summary>
|
||||
public bool RemoveMachineDB(long machineIndex)
|
||||
{
|
||||
return ItemsDB.RemoveMachine(machineIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove a machine, returning if it could be removed
|
||||
/// </summary>
|
||||
public bool RemoveMachineDB(string machineName)
|
||||
{
|
||||
return ItemsDB.RemoveMachine(machineName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset the internal item dictionary
|
||||
/// </summary>
|
||||
|
||||
@@ -1577,7 +1577,7 @@ namespace SabreTools.DatFiles
|
||||
|
||||
// Now remove the key from the source DAT
|
||||
if (delete)
|
||||
addFrom.ItemsDB.RemoveItem(item.Key);
|
||||
addFrom.RemoveItemDB(item.Key);
|
||||
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user