refactor(app): compose session and player startup
Move streaming, live-session, hydration, local-player, combat, and teleport construction behind the typed Phase-7 boundary. Add exact-owner runtime bindings and focused spawn-claim classification so partial startup rolls back without retaining old session targets while preserving the accepted construction and frame dependencies. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
3573da12e1
commit
7771c07fb6
31 changed files with 1759 additions and 532 deletions
|
|
@ -13,6 +13,25 @@ namespace AcDream.App.Tests.Streaming;
|
|||
|
||||
public sealed class LocalPlayerTeleportControllerTests
|
||||
{
|
||||
[Fact]
|
||||
public void DeferredNetworkOwnedBindingReleasesExactlyAndAllowsRebind()
|
||||
{
|
||||
var deferred = new DeferredLocalPlayerTeleportNetworkSink();
|
||||
var first = new FakeNetworkSink();
|
||||
var second = new FakeNetworkSink();
|
||||
|
||||
IDisposable firstBinding = deferred.BindOwned(first);
|
||||
Assert.Throws<InvalidOperationException>(() => deferred.BindOwned(second));
|
||||
|
||||
firstBinding.Dispose();
|
||||
using IDisposable secondBinding = deferred.BindOwned(second);
|
||||
firstBinding.Dispose();
|
||||
deferred.OnTeleportStarted(9);
|
||||
|
||||
Assert.Empty(first.Starts);
|
||||
Assert.Equal([9u], second.Starts);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DestinationBeforeStart_IsReplayedOnceAfterPresentationActivates()
|
||||
{
|
||||
|
|
@ -684,6 +703,20 @@ public sealed class LocalPlayerTeleportControllerTests
|
|||
}
|
||||
}
|
||||
|
||||
private sealed class FakeNetworkSink : ILocalPlayerTeleportNetworkSink
|
||||
{
|
||||
public List<uint> Starts { get; } = [];
|
||||
public void OnTeleportStarted(uint sequence) => Starts.Add(sequence);
|
||||
public void OfferDestination(
|
||||
WorldSession.EntityPositionUpdate update,
|
||||
bool teleportTimestampAdvanced)
|
||||
{
|
||||
}
|
||||
public void ResetSession()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class FakePresentation : ILocalPlayerTeleportPresentation
|
||||
{
|
||||
private readonly List<string> _order;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue