Rename legacy runtime cache

This commit is contained in:
Meta Vens 2026-06-13 07:11:16 +01:00
commit 742bb69d43
6 changed files with 28 additions and 27 deletions

View file

@ -10,7 +10,7 @@ using System.Reflection;
using MessagePack;
using UniRx;
public class CultCache
public class LegacyCatalogCache
{
private readonly object addLock = new object();
@ -27,7 +27,7 @@ public class CultCache
public IEnumerable<DatabaseEntry> AllEntries => _entries.Values;
public CultCache()
public LegacyCatalogCache()
{
foreach (var type in typeof(DatabaseEntry).GetAllChildClasses())
{

View file

@ -78,21 +78,21 @@ public class DatabaseLinkBase
public Guid LinkID;
[IgnoreMember]
private static CultCache LegacyCatalogCache { get; set; }
private static LegacyCatalogCache CatalogCache { get; set; }
protected static T ResolveLegacyCatalog<T>(Guid linkId) where T : DatabaseEntry
{
if (LegacyCatalogCache == null)
if (CatalogCache == null)
throw new InvalidOperationException("Legacy DatabaseLink resolution is not bound. Open LegacyCatalogBoundary before reading legacy catalog object graphs.");
return LegacyCatalogCache.Get<T>(linkId);
return CatalogCache.Get<T>(linkId);
}
public static void BindLegacyCatalog(CultCache cache)
public static void BindLegacyCatalog(LegacyCatalogCache cache)
{
if (cache == null) throw new ArgumentNullException(nameof(cache));
LegacyCatalogCache = cache;
CatalogCache = cache;
}
}