refactor(runtime): acknowledge exact world host projections
This commit is contained in:
parent
73d0b54e38
commit
18d17d8bb1
17 changed files with 1677 additions and 72 deletions
|
|
@ -6,6 +6,7 @@ using AcDream.App.Streaming;
|
|||
using AcDream.App.UI.Testing;
|
||||
using AcDream.Core.Physics;
|
||||
using AcDream.Runtime;
|
||||
using AcDream.Runtime.World;
|
||||
|
||||
namespace AcDream.App.Diagnostics;
|
||||
|
||||
|
|
@ -103,6 +104,8 @@ internal sealed record WorldLifecycleCheckpoint(
|
|||
DateTime TimestampUtc,
|
||||
int ProcessId,
|
||||
RuntimePortalSnapshot Reveal,
|
||||
RuntimeWorldEnvironmentOwnershipSnapshot EnvironmentOwnership,
|
||||
RuntimeWorldTransitOwnershipSnapshot TransitOwnership,
|
||||
RenderFrameOutcome Render,
|
||||
WorldLifecycleResourceSnapshot Resources);
|
||||
|
||||
|
|
@ -177,6 +180,10 @@ internal sealed class WorldLifecycleAutomationController :
|
|||
};
|
||||
|
||||
private readonly Func<RuntimePortalSnapshot> _getReveal;
|
||||
private readonly Func<RuntimeWorldEnvironmentOwnershipSnapshot>
|
||||
_getEnvironmentOwnership;
|
||||
private readonly Func<RuntimeWorldTransitOwnershipSnapshot>
|
||||
_getTransitOwnership;
|
||||
private readonly Func<int> _getPortalMaterializationCount;
|
||||
private readonly Func<RenderFrameOutcome, WorldLifecycleResourceSnapshot>
|
||||
_captureResources;
|
||||
|
|
@ -191,6 +198,9 @@ internal sealed class WorldLifecycleAutomationController :
|
|||
|
||||
public WorldLifecycleAutomationController(
|
||||
Func<RuntimePortalSnapshot> getReveal,
|
||||
Func<RuntimeWorldEnvironmentOwnershipSnapshot>
|
||||
getEnvironmentOwnership,
|
||||
Func<RuntimeWorldTransitOwnershipSnapshot> getTransitOwnership,
|
||||
Func<int> getPortalMaterializationCount,
|
||||
Func<RenderFrameOutcome, WorldLifecycleResourceSnapshot> captureResources,
|
||||
FrameScreenshotController screenshots,
|
||||
|
|
@ -198,6 +208,11 @@ internal sealed class WorldLifecycleAutomationController :
|
|||
Action<string>? log = null)
|
||||
{
|
||||
_getReveal = getReveal ?? throw new ArgumentNullException(nameof(getReveal));
|
||||
_getEnvironmentOwnership = getEnvironmentOwnership
|
||||
?? throw new ArgumentNullException(
|
||||
nameof(getEnvironmentOwnership));
|
||||
_getTransitOwnership = getTransitOwnership
|
||||
?? throw new ArgumentNullException(nameof(getTransitOwnership));
|
||||
_getPortalMaterializationCount = getPortalMaterializationCount
|
||||
?? throw new ArgumentNullException(nameof(getPortalMaterializationCount));
|
||||
_captureResources = captureResources ?? throw new ArgumentNullException(nameof(captureResources));
|
||||
|
|
@ -289,6 +304,8 @@ internal sealed class WorldLifecycleAutomationController :
|
|||
TimestampUtc: DateTime.UtcNow,
|
||||
ProcessId: Environment.ProcessId,
|
||||
Reveal: _getReveal(),
|
||||
EnvironmentOwnership: _getEnvironmentOwnership(),
|
||||
TransitOwnership: _getTransitOwnership(),
|
||||
Render: outcome,
|
||||
Resources: _captureResources(outcome));
|
||||
string json = JsonSerializer.Serialize(checkpoint, JsonOptions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue