Rename legacy item catalog bridge
This commit is contained in:
parent
9655d5ad7b
commit
0133531d40
7 changed files with 39 additions and 39 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue