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;
public interface IMetaCache : IDisposable
{
public void SetFiles();
public void Reset();
public void ResetFiles();
public int Count { get; }
}
public abstract class MetaCacheBase<TIdentifier, TEntry>
: Dictionary<TIdentifier, (IMod Source, TEntry Entry)>, IMetaCache
: Dictionary<TIdentifier, (IMod Source, TEntry Entry)>
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<TIdentifier, TEntry>
{
IncorporateChangesInternal();
}
if (Manager.ActiveCollections.Default == Collection && Manager.Config.EnableMods)
SetFiles();
}

View file

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