From 4b1443ec930c54bd830ab89eba38a7927163c928 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Tue, 2 May 2023 21:13:01 +0200 Subject: [PATCH] Fuck --- Penumbra/Collections/Cache/CollectionCache.cs | 2 ++ Penumbra/Collections/Cache/CollectionCacheManager.cs | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Penumbra/Collections/Cache/CollectionCache.cs b/Penumbra/Collections/Cache/CollectionCache.cs index 1d2ff39c..af037ce5 100644 --- a/Penumbra/Collections/Cache/CollectionCache.cs +++ b/Penumbra/Collections/Cache/CollectionCache.cs @@ -29,6 +29,8 @@ public class CollectionCache : IDisposable public readonly MetaCache Meta; public readonly Dictionary> _conflicts = new(); + public bool Calculating; + public IEnumerable> AllConflicts => _conflicts.Values; diff --git a/Penumbra/Collections/Cache/CollectionCacheManager.cs b/Penumbra/Collections/Cache/CollectionCacheManager.cs index d5df7d7d..e415dc62 100644 --- a/Penumbra/Collections/Cache/CollectionCacheManager.cs +++ b/Penumbra/Collections/Cache/CollectionCacheManager.cs @@ -28,7 +28,6 @@ public class CollectionCacheManager : IDisposable internal readonly MetaFileManager MetaFileManager; public int Count { get; private set; } - public bool Calculating { get; private set; } public IEnumerable Active => _storage.Where(c => c.HasCache); @@ -117,10 +116,10 @@ public class CollectionCacheManager : IDisposable private void FullRecalculation(ModCollection collection) { var cache = collection._cache; - if (cache == null || Calculating) + if (cache == null || cache.Calculating) return; - Calculating = true; + cache.Calculating = true; try { cache.ResolvedFiles.Clear(); @@ -145,7 +144,7 @@ public class CollectionCacheManager : IDisposable } finally { - Calculating = false; + cache.Calculating = false; } }