refactor(runtime): own world reveal generation

This commit is contained in:
Erik 2026-07-26 17:09:54 +02:00
parent 4ab98b080e
commit a6860d5563
26 changed files with 1294 additions and 502 deletions

View file

@ -8,6 +8,8 @@ using AcDream.Core.Net;
using AcDream.Core.Net.Messages;
using AcDream.Core.Physics;
using AcDream.Core.World;
using AcDream.Runtime;
using AcDream.Runtime.World;
namespace AcDream.App.Tests.Streaming;
@ -57,7 +59,7 @@ public sealed class LocalPlayerTeleportControllerTests
(1L, 0x20210001u, WorldRevealReadinessBarrier.OutdoorNeighborhoodRadius),
Assert.Single(harness.Streaming.Reservations));
Assert.True(harness.Reveal.Snapshot.IsActive);
Assert.Equal(WorldRevealKind.Portal, harness.Reveal.Snapshot.Kind);
Assert.Equal(RuntimePortalKind.Portal, harness.Reveal.Snapshot.Kind);
harness.Controller.OfferDestination(
destination,
@ -310,7 +312,7 @@ public sealed class LocalPlayerTeleportControllerTests
harness.Controller.ResetSession();
Assert.False(harness.Controller.IsActive);
Assert.True(harness.Reveal.Snapshot.Cancelled);
Assert.Equal(RuntimePortalSnapshot.Idle, harness.Reveal.Snapshot);
Assert.True(harness.Streaming.LastResetWasSessionEnding);
var failed = new Harness();
@ -665,6 +667,7 @@ public sealed class LocalPlayerTeleportControllerTests
Session = new FakeSession(order);
Presentation = new FakePresentation(order);
Reveal = new WorldRevealCoordinator(
new RuntimeWorldTransitState(order.Add),
isRenderNeighborhoodReady: (_, _) => worldReady,
isSpawnCellReady: _ => worldReady,
isTerrainNeighborhoodReady: (_, _) => worldReady,
@ -672,7 +675,6 @@ public sealed class LocalPlayerTeleportControllerTests
prepareCompositeTextures: (_, _) => { },
invalidateCompositeTextures: () => { },
isSpawnClaimUnhydratable: _ => false,
log: order.Add,
streaming: Streaming);
Controller = new LocalPlayerTeleportController(
Authority,