refactor(runtime): acknowledge exact world host projections

This commit is contained in:
Erik 2026-07-26 18:27:41 +02:00
parent 73d0b54e38
commit 18d17d8bb1
17 changed files with 1677 additions and 72 deletions

View file

@ -81,7 +81,34 @@ public sealed class RuntimeWorldTransitOwnershipTests
coordinatorFields,
field => field.Name is "_activeGeneration"
or "_worldSimulationReleased"
or "_lifecycle");
or "_lifecycle"
or "_reservationGeneration"
or "_worldViewportReleased"
or "_hostProjection");
Assert.DoesNotContain(
coordinatorFields,
field => field.FieldType == typeof(RuntimePortalSnapshot)
|| field.FieldType == typeof(RuntimeDestinationReadiness)
|| field.FieldType == typeof(long)
|| field.FieldType == typeof(uint));
Type hostProjection = Assert.Single(
typeof(WorldRevealCoordinator).GetNestedTypes(
System.Reflection.BindingFlags.NonPublic),
type => type.Name == "HostProjection");
var hostFields = hostProjection.GetFields(
System.Reflection.BindingFlags.Instance
| System.Reflection.BindingFlags.NonPublic);
Assert.Single(
hostFields,
field => field.FieldType
== typeof(RuntimeWorldHostProjectionToken));
Assert.DoesNotContain(
hostFields,
field => field.FieldType == typeof(RuntimePortalSnapshot)
|| field.FieldType == typeof(RuntimeDestinationReadiness)
|| field.FieldType == typeof(long)
|| field.FieldType == typeof(uint));
var teleportFields = typeof(LocalPlayerTeleportController)
.GetFields(