Split typed state path from legacy catalog
This commit is contained in:
parent
64e596d92d
commit
c8fd1d5e22
5 changed files with 22 additions and 10 deletions
|
|
@ -35,7 +35,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
get => _gameDataDirectory ??= new DirectoryInfo(Application.dataPath).Parent.CreateSubdirectory("GameData");
|
||||
}
|
||||
|
||||
public static string AetheriaStateFilePath => LegacyCatalogBoundary.GetStateFilePath(GameDataDirectory);
|
||||
public static string AetheriaStateFilePath => AetheriaStateBoundary.GetStateFilePath(GameDataDirectory);
|
||||
private static string LegacyAetherDatabasePath => LegacyCatalogBoundary.GetLegacyCatalogPath(GameDataDirectory);
|
||||
private static ILegacyCatalogReader LegacyCatalog => LegacyCatalogBoundary.GetCatalog(GameDataDirectory);
|
||||
|
||||
|
|
|
|||
11
Assets/Scripts/Gameplay/AetheriaStateBoundary.cs
Normal file
11
Assets/Scripts/Gameplay/AetheriaStateBoundary.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using System.IO;
|
||||
|
||||
public static class AetheriaStateBoundary
|
||||
{
|
||||
public const string RuntimeStateFileName = "aetheria-world.cc";
|
||||
|
||||
public static string GetStateFilePath(DirectoryInfo gameDataDirectory)
|
||||
{
|
||||
return Path.Combine(gameDataDirectory.FullName, RuntimeStateFileName);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,11 +4,6 @@ public static class LegacyCatalogBoundary
|
|||
{
|
||||
private static LegacyCatalogCache _catalogCache;
|
||||
|
||||
public static string GetStateFilePath(DirectoryInfo gameDataDirectory)
|
||||
{
|
||||
return Path.Combine(gameDataDirectory.FullName, "aetheria-world.cc");
|
||||
}
|
||||
|
||||
public static string GetLegacyCatalogPath(DirectoryInfo gameDataDirectory)
|
||||
{
|
||||
return Path.Combine(gameDataDirectory.FullName, "AetherDB.msgpack");
|
||||
|
|
|
|||
Loading…
Reference in a new issue