refactor(app): key live projections by runtime identity
Move materialized live-object sidecars and presentation worksets to exact RuntimeEntityKey ownership. Runtime remains the only GUID/incarnation/local-ID authority while hydration, animation, effects, lights, equipped children, renderer resources, visibility, liveness, and teardown resolve exact projection identities. Preserve synchronous callbacks, local-ID allocation order, and current rendering behavior.
This commit is contained in:
parent
e18df84437
commit
420e5eea70
73 changed files with 2939 additions and 1715 deletions
|
|
@ -7,6 +7,7 @@ using AcDream.App.Net;
|
|||
using AcDream.App.Rendering;
|
||||
using AcDream.App.UI;
|
||||
using AcDream.App.UI.Layout;
|
||||
using AcDream.App.World;
|
||||
using AcDream.Core.Net;
|
||||
using AcDream.Core.World;
|
||||
using AcDream.UI.Abstractions;
|
||||
|
|
@ -91,7 +92,7 @@ public sealed class InteractionUiRuntimeSourcesTests
|
|||
|
||||
var provider = new RadarSnapshotProvider(
|
||||
new AcDream.Core.Items.ClientObjectTable(),
|
||||
static () => new Dictionary<uint, WorldEntity>(),
|
||||
EmptyRadarSource.Instance,
|
||||
static () => new Dictionary<uint, WorldSession.EntitySpawn>(),
|
||||
static () => 0u,
|
||||
static () => 0f,
|
||||
|
|
@ -253,6 +254,29 @@ public sealed class InteractionUiRuntimeSourcesTests
|
|||
}
|
||||
}
|
||||
|
||||
private sealed class EmptyRadarSource : ILiveEntityRadarSource
|
||||
{
|
||||
public static EmptyRadarSource Instance { get; } = new();
|
||||
|
||||
public bool TryGetMaterialized(
|
||||
uint serverGuid,
|
||||
out WorldEntity entity)
|
||||
{
|
||||
entity = null!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetVisible(uint serverGuid, out WorldEntity entity)
|
||||
{
|
||||
entity = null!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void CopyVisibleTo(
|
||||
List<KeyValuePair<uint, WorldEntity>> destination) =>
|
||||
destination.Clear();
|
||||
}
|
||||
|
||||
private static T Stub<T>() where T : class =>
|
||||
(T)RuntimeHelpers.GetUninitializedObject(typeof(T));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue