Move remote-motion construction, CreateObject vector initialization, final simulation-component retirement, and the combined J5 ownership ledger into Runtime. Delete App compatibility views and moved-state reconstruction while preserving the existing graphical projection and retail update order.
44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using AcDream.Runtime.Entities;
|
|
using AcDream.Runtime.Gameplay;
|
|
using AcDream.Runtime.Physics;
|
|
|
|
namespace AcDream.Runtime;
|
|
|
|
/// <summary>
|
|
/// One allocation-free terminal ownership ledger for the complete J5
|
|
/// presentation-independent simulation graph. It owns no mutable state.
|
|
/// Graphical and no-window hosts inspect the same canonical owners.
|
|
/// </summary>
|
|
public readonly record struct RuntimeSimulationOwnershipSnapshot(
|
|
RuntimeEntityObjectOwnershipSnapshot EntityObjects,
|
|
RuntimePhysicsOwnershipSnapshot Physics,
|
|
RuntimeGameplayOwnershipSnapshot Gameplay)
|
|
{
|
|
public bool IsConverged =>
|
|
EntityObjects.IsConverged
|
|
&& Physics.IsConverged
|
|
&& Gameplay.IsConverged;
|
|
}
|
|
|
|
public static class RuntimeSimulationOwnership
|
|
{
|
|
public static RuntimeSimulationOwnershipSnapshot Capture(
|
|
RuntimeEntityObjectLifetime entityObjects,
|
|
RuntimeInventoryState inventory,
|
|
RuntimeCharacterState character,
|
|
RuntimeCommunicationState communication,
|
|
RuntimeActionState actions,
|
|
RuntimeLocalPlayerMovementState movement)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(entityObjects);
|
|
return new RuntimeSimulationOwnershipSnapshot(
|
|
entityObjects.CaptureOwnership(),
|
|
entityObjects.Physics.CaptureOwnership(),
|
|
RuntimeGameplayOwnership.Capture(
|
|
inventory,
|
|
character,
|
|
communication,
|
|
actions,
|
|
movement));
|
|
}
|
|
}
|