Fix issue, remove IMetaCache.

This commit is contained in:
Ottermandias 2024-06-14 23:09:38 +02:00
parent 4ca49598f8
commit e33512cf7f
2 changed files with 4 additions and 12 deletions

View file

@ -4,21 +4,12 @@ using Penumbra.Mods.Editor;
namespace Penumbra.Collections.Cache; 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<TIdentifier, TEntry> public abstract class MetaCacheBase<TIdentifier, TEntry>
: Dictionary<TIdentifier, (IMod Source, TEntry Entry)>, IMetaCache : Dictionary<TIdentifier, (IMod Source, TEntry Entry)>
where TIdentifier : unmanaged, IMetaIdentifier where TIdentifier : unmanaged, IMetaIdentifier
where TEntry : unmanaged where TEntry : unmanaged
{ {
public MetaCacheBase(MetaFileManager manager, ModCollection collection) protected MetaCacheBase(MetaFileManager manager, ModCollection collection)
{ {
Manager = manager; Manager = manager;
Collection = collection; Collection = collection;
@ -76,6 +67,7 @@ public abstract class MetaCacheBase<TIdentifier, TEntry>
{ {
IncorporateChangesInternal(); IncorporateChangesInternal();
} }
if (Manager.ActiveCollections.Default == Collection && Manager.Config.EnableMods) if (Manager.ActiveCollections.Default == Collection && Manager.Config.EnableMods)
SetFiles(); SetFiles();
} }

View file

@ -346,7 +346,7 @@ public class MetaDictionary
} }
failedIdentifier = default; failedIdentifier = default;
return false; return true;
} }
public void SetTo(MetaDictionary other) public void SetTo(MetaDictionary other)