feat(slice2): add PhysicsEngine.IsLandblockLoaded — readiness gate §3.4

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-21 20:10:22 +02:00
parent 00ef47ed59
commit ad8c24ef8b
2 changed files with 66 additions and 0 deletions

View file

@ -31,6 +31,15 @@ public sealed class PhysicsEngine
/// <summary>Number of registered landblocks (diagnostic).</summary>
public int LandblockCount => _landblocks.Count;
/// <summary>
/// Returns true iff a landblock with this id has been registered via
/// <see cref="AddLandblock"/>. Because <see cref="AddLandblock"/> registers
/// terrain + collision cells + portals atomically, ContainsKey implies the
/// collision mesh is present and resolvable.
/// </summary>
public bool IsLandblockLoaded(uint landblockId) =>
_landblocks.ContainsKey(landblockId);
/// <summary>
/// Cell-based spatial index for static object collision.
/// Populated during landblock streaming; queried by the Transition system.