Add typed verse settings shell and command bridge
This commit is contained in:
parent
cff88b79e4
commit
fea05967f8
14 changed files with 765 additions and 5 deletions
|
|
@ -83,6 +83,19 @@ namespace GameCult.Aetheria.State.Unity
|
|||
MessagePackSerializer.Serialize(document));
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeClientTargetDocument Update(
|
||||
string clientTargetPath,
|
||||
string defaultStateFilePath,
|
||||
Action<AetheriaRuntimeClientTargetDocument> mutate)
|
||||
{
|
||||
if (mutate == null) throw new ArgumentNullException(nameof(mutate));
|
||||
|
||||
var document = ReadOrInitialize(clientTargetPath, defaultStateFilePath);
|
||||
mutate(document);
|
||||
Write(clientTargetPath, document);
|
||||
return document;
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeClientTargetDocument Read(string clientTargetPath)
|
||||
{
|
||||
return MessagePackSerializer.Deserialize<AetheriaRuntimeClientTargetDocument>(
|
||||
|
|
|
|||
Loading…
Reference in a new issue