diff --git a/Penumbra/Collections/Cache/IMetaCache.cs b/Penumbra/Collections/Cache/IMetaCache.cs index 218c1840..eacbdcc2 100644 --- a/Penumbra/Collections/Cache/IMetaCache.cs +++ b/Penumbra/Collections/Cache/IMetaCache.cs @@ -4,21 +4,12 @@ using Penumbra.Mods.Editor; namespace Penumbra.Collections.Cache; -public interface IMetaCache : IDisposable -{ - public void SetFiles(); - public void Reset(); - public void ResetFiles(); - - public int Count { get; } -} - public abstract class MetaCacheBase - : Dictionary, IMetaCache + : Dictionary where TIdentifier : unmanaged, IMetaIdentifier where TEntry : unmanaged { - public MetaCacheBase(MetaFileManager manager, ModCollection collection) + protected MetaCacheBase(MetaFileManager manager, ModCollection collection) { Manager = manager; Collection = collection; @@ -76,6 +67,7 @@ public abstract class MetaCacheBase { IncorporateChangesInternal(); } + if (Manager.ActiveCollections.Default == Collection && Manager.Config.EnableMods) SetFiles(); } diff --git a/Penumbra/Meta/Manipulations/MetaDictionary.cs b/Penumbra/Meta/Manipulations/MetaDictionary.cs index 5a51df83..1093c6c5 100644 --- a/Penumbra/Meta/Manipulations/MetaDictionary.cs +++ b/Penumbra/Meta/Manipulations/MetaDictionary.cs @@ -346,7 +346,7 @@ public class MetaDictionary } failedIdentifier = default; - return false; + return true; } public void SetTo(MetaDictionary other)