Rename legacy item catalog bridge

This commit is contained in:
Meta Vens 2026-06-13 14:11:51 +01:00
commit 0133531d40
7 changed files with 39 additions and 39 deletions

View file

@ -36,8 +36,8 @@ public class ActionGameManager : MonoBehaviour
get => _gameDataDirectory ??= new DirectoryInfo(Application.dataPath).Parent.CreateSubdirectory("GameData");
}
private static string LegacyAetherDatabasePath => LegacyCatalogBoundary.GetLegacyCatalogPath(GameDataDirectory);
private static ILegacyCatalogReader LegacyCatalog => LegacyCatalogBoundary.GetCatalog(GameDataDirectory);
private static string LegacyAetherDatabasePath => LegacyItemCatalogBoundary.GetLegacyItemCatalogPath(GameDataDirectory);
private static ILegacyItemCatalogReader LegacyCatalog => LegacyItemCatalogBoundary.GetCatalog(GameDataDirectory);
private static PlayerSettings _playerSettings;
public static PlayerSettings PlayerSettings

View file

@ -1,22 +1,22 @@
using System.IO;
public static class LegacyCatalogBoundary
public static class LegacyItemCatalogBoundary
{
private static LegacyCatalogCache _catalogCache;
private static LegacyItemCatalogCache _catalogCache;
public static string GetLegacyCatalogPath(DirectoryInfo gameDataDirectory)
public static string GetLegacyItemCatalogPath(DirectoryInfo gameDataDirectory)
{
return Path.Combine(gameDataDirectory.FullName, "AetherDB.msgpack");
}
public static ILegacyCatalogReader GetCatalog(DirectoryInfo gameDataDirectory)
public static ILegacyItemCatalogReader GetCatalog(DirectoryInfo gameDataDirectory)
{
if (_catalogCache != null) return _catalogCache;
_catalogCache = new LegacyCatalogCache();
_catalogCache.AddBackingStore(new SingleFileMessagePackBackingStore(GetLegacyCatalogPath(gameDataDirectory)));
_catalogCache = new LegacyItemCatalogCache();
_catalogCache.AddBackingStore(new SingleFileMessagePackBackingStore(GetLegacyItemCatalogPath(gameDataDirectory)));
_catalogCache.PullAllBackingStores();
DatabaseLinkBase.BindLegacyCatalog(_catalogCache);
DatabaseLinkBase.BindLegacyItemCatalog(_catalogCache);
return _catalogCache;
}
}