Project daemon designer surfaces from managed catalog
This commit is contained in:
parent
1f066b793b
commit
e78f158629
3 changed files with 36 additions and 17 deletions
|
|
@ -9993,9 +9993,10 @@ static void RequireDaemonVersePublication(string root)
|
|||
"AetheriaRuntimeStarbridgeProjection.ProjectSessionSummary(",
|
||||
"StarbridgeScenario",
|
||||
"StarbridgeSession",
|
||||
"var catalog = options.Catalog ?? new AetheriaRuntimeCatalogSnapshot(",
|
||||
"AetheriaRuntimeDaemonGameSurfaceBuilder.Build",
|
||||
"AetheriaRuntimeCatalogStore.ProjectStatRecipeSurfaceDocument(stateFilePath)",
|
||||
"AetheriaRuntimeCatalogStore.ProjectTradeValuePolicySurfaceDocument(stateFilePath)",
|
||||
"AetheriaRuntimeCatalogStore.ProjectStatRecipeSurfaceDocument(catalog)",
|
||||
"AetheriaRuntimeCatalogStore.ProjectTradeValuePolicySurfaceDocument(catalog)",
|
||||
"AetheriaRuntimeDaemonEditorSurfaceBuilder.Build",
|
||||
"SoaView = soaView",
|
||||
"ProviderAdvertisement = providerAdvertisement",
|
||||
|
|
@ -10032,7 +10033,9 @@ static void RequireDaemonVersePublication(string root)
|
|||
"AetheriaRuntimeDaemonPublicationStore.PublishGameSurface(",
|
||||
"AetheriaRuntimeDaemonPublicationStore.PublishGameTuiSurface(",
|
||||
"AetheriaRuntimeDaemonPublicationStore.PublishEditorSurface(",
|
||||
"AetheriaRuntimeDaemonPublicationStore.PublishEditorTuiSurface("
|
||||
"AetheriaRuntimeDaemonPublicationStore.PublishEditorTuiSurface(",
|
||||
"AetheriaRuntimeCatalogStore.ProjectStatRecipeSurfaceDocument(stateFilePath)",
|
||||
"AetheriaRuntimeCatalogStore.ProjectTradeValuePolicySurfaceDocument(stateFilePath)"
|
||||
};
|
||||
var forbiddenTickPublicationHits = forbiddenTickPublicationSymbols
|
||||
.Where(symbol => daemonTickRunner.Contains(symbol, StringComparison.Ordinal))
|
||||
|
|
|
|||
|
|
@ -73,36 +73,48 @@ namespace GameCult.Aetheria.State.Verse
|
|||
surfaces.Add(ReadEveSurface(record.Payload));
|
||||
}
|
||||
|
||||
var catalogSnapshot = OpenReadOnly(stateFilePath);
|
||||
surfaces.Add(AetheriaRuntimeEveSurfaceAdapter.ToEveSurfaceDocument(
|
||||
ProjectStatRecipeSurfaceDocument(stateFilePath)));
|
||||
ProjectStatRecipeSurfaceDocument(catalogSnapshot)));
|
||||
surfaces.Add(AetheriaRuntimeEveSurfaceAdapter.ToEveSurfaceDocument(
|
||||
ProjectTradeValuePolicySurfaceDocument(stateFilePath)));
|
||||
ProjectTradeValuePolicySurfaceDocument(catalogSnapshot)));
|
||||
return surfaces;
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeSurfaceDocument ProjectStatRecipeSurfaceDocument(string stateFilePath)
|
||||
{
|
||||
var state = ProjectStatRecipeSurfaceState(stateFilePath);
|
||||
return AetheriaRuntimeStatRecipeSurfaceBuilder.Build(state);
|
||||
return ProjectStatRecipeSurfaceDocument(OpenReadOnly(stateFilePath));
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeSurfaceDocument ProjectStatRecipeSurfaceDocument(
|
||||
AetheriaRuntimeCatalogSnapshot? catalog)
|
||||
{
|
||||
return AetheriaRuntimeStatRecipeSurfaceBuilder.Build(ProjectStatRecipeSurfaceState(catalog));
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeSurfaceDocument ProjectTradeValuePolicySurfaceDocument(string stateFilePath)
|
||||
{
|
||||
var state = ProjectTradeValuePolicySurfaceState(stateFilePath);
|
||||
return AetheriaRuntimeTradeValuePolicySurfaceBuilder.Build(state);
|
||||
return ProjectTradeValuePolicySurfaceDocument(OpenReadOnly(stateFilePath));
|
||||
}
|
||||
|
||||
private static AetheriaRuntimeTradeValuePolicySurfaceState ProjectTradeValuePolicySurfaceState(string stateFilePath)
|
||||
public static AetheriaRuntimeSurfaceDocument ProjectTradeValuePolicySurfaceDocument(
|
||||
AetheriaRuntimeCatalogSnapshot? catalog)
|
||||
{
|
||||
return AetheriaRuntimeTradeValuePolicySurfaceBuilder.Build(ProjectTradeValuePolicySurfaceState(catalog));
|
||||
}
|
||||
|
||||
private static AetheriaRuntimeTradeValuePolicySurfaceState ProjectTradeValuePolicySurfaceState(
|
||||
AetheriaRuntimeCatalogSnapshot? catalog)
|
||||
{
|
||||
return new AetheriaRuntimeTradeValuePolicySurfaceState(
|
||||
ReadTradeValuePolicy(stateFilePath),
|
||||
catalog?.TradeValueSettings ?? AetheriaRuntimeTradeValueSettings.Default,
|
||||
DateTime.UtcNow.ToString("O"));
|
||||
}
|
||||
|
||||
private static AetheriaRuntimeStatRecipeSurfaceState ProjectStatRecipeSurfaceState(string stateFilePath)
|
||||
private static AetheriaRuntimeStatRecipeSurfaceState ProjectStatRecipeSurfaceState(
|
||||
AetheriaRuntimeCatalogSnapshot? catalog)
|
||||
{
|
||||
var catalog = OpenReadOnly(stateFilePath);
|
||||
var recipes = catalog.Items
|
||||
var recipes = (catalog?.Items ?? Array.Empty<AetheriaRuntimeCatalogItem>())
|
||||
.SelectMany(ProjectStatRecipeRows)
|
||||
.OrderBy(recipe => recipe.StatName, StringComparer.Ordinal)
|
||||
.ToArray();
|
||||
|
|
|
|||
|
|
@ -199,11 +199,15 @@ namespace GameCult.Aetheria.State.Verse
|
|||
Transport = "cultmesh-managed",
|
||||
CommandBoundaryPath = AetheriaRuntimeVerseRecordKeys.DaemonCommandBoundary.ToString()
|
||||
};
|
||||
var catalog = options.Catalog ?? new AetheriaRuntimeCatalogSnapshot(
|
||||
Array.Empty<AetheriaRuntimeCatalogItem>(),
|
||||
Array.Empty<AetheriaRuntimeCorporation>(),
|
||||
Array.Empty<AetheriaRuntimeNameFile>());
|
||||
var starbridgeSummary = AetheriaRuntimeStarbridgeProjection.ProjectSessionSummary(
|
||||
frame,
|
||||
options.StarbridgeScenario,
|
||||
options.StarbridgeSession,
|
||||
options.Catalog);
|
||||
catalog);
|
||||
var gameSurface = AetheriaRuntimeDaemonGameSurfaceBuilder.Build(
|
||||
frame,
|
||||
health,
|
||||
|
|
@ -211,8 +215,8 @@ namespace GameCult.Aetheria.State.Verse
|
|||
starbridgeSummary);
|
||||
var designerSurfaces = new[]
|
||||
{
|
||||
AetheriaRuntimeCatalogStore.ProjectStatRecipeSurfaceDocument(stateFilePath),
|
||||
AetheriaRuntimeCatalogStore.ProjectTradeValuePolicySurfaceDocument(stateFilePath)
|
||||
AetheriaRuntimeCatalogStore.ProjectStatRecipeSurfaceDocument(catalog),
|
||||
AetheriaRuntimeCatalogStore.ProjectTradeValuePolicySurfaceDocument(catalog)
|
||||
};
|
||||
var editorSurface = AetheriaRuntimeDaemonEditorSurfaceBuilder.Build(
|
||||
providerAdvertisement,
|
||||
|
|
|
|||
Loading…
Reference in a new issue