Build local story surfaces directly

This commit is contained in:
Meta Vens 2026-06-29 05:21:22 +01:00
commit e45c86026b
3 changed files with 36 additions and 21 deletions

View file

@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using GameCult.Aetheria.EveRuntime;
using GameCult.Aetheria.State.Verse;
@ -146,24 +145,19 @@ public class LocalMenu : MonoBehaviour
transform,
_surfaceDocument,
"Aetheria Runtime Local Story Surface",
AetheriaRuntimeLocalStorySurfaceBuilder.Build(ProjectStorySurface()),
AetheriaRuntimeLocalStorySurfaceBuilder.Build(
ResolveLocationLabel(),
_currentPath,
_activeStory?.currentText ?? "",
_activeStory?.canContinue == true,
_activeChoices.Select(choice => new AetheriaRuntimeLocalStoryChoiceState(
choice.Index,
choice.Choice?.text ?? "")),
DateTime.UtcNow.ToString("O")),
HandleStorySurfaceCommand,
_surfaceChrome);
}
private AetheriaRuntimeLocalStorySurfaceState ProjectStorySurface()
{
return AetheriaRuntimeLocalStorySurfaceBuilder.Project(
ResolveLocationLabel(),
_currentPath,
_activeStory?.currentText ?? "",
_activeStory?.canContinue == true,
_activeChoices.Select(choice => new AetheriaRuntimeLocalStoryChoiceState(
choice.Index,
choice.Choice?.text ?? "")),
DateTime.UtcNow.ToString("O", CultureInfo.InvariantCulture));
}
private void HandleStorySurfaceCommand(EveSurfaceCommandRequest request)
{
if (!AetheriaRuntimeLocalStorySurfaceCommands.TryRead(request, out var command))