Extract collection counters.

This commit is contained in:
Ottermandias 2024-12-27 10:39:24 +01:00
parent 7a2691b942
commit fbbfe5e00d
10 changed files with 48 additions and 32 deletions

View file

@ -39,7 +39,7 @@ public sealed class ImcCache(MetaFileManager manager, ModCollection collection)
protected override void ApplyModInternal(ImcIdentifier identifier, ImcEntry entry)
{
++Collection.ImcChangeCounter;
Collection.Counters.IncrementImc();
ApplyFile(identifier, entry);
}
@ -71,7 +71,7 @@ public sealed class ImcCache(MetaFileManager manager, ModCollection collection)
protected override void RevertModInternal(ImcIdentifier identifier)
{
++Collection.ImcChangeCounter;
Collection.Counters.IncrementImc();
var path = identifier.GamePath().Path;
if (!_imcFiles.TryGetValue(path, out var pair))
return;