fix(core): UCG Stage 1 — final-review polish (VisibleCells null-guard, Neighbor doc)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-02 09:44:14 +02:00
parent 8e703bef22
commit f2663b7e4b
2 changed files with 8 additions and 2 deletions

View file

@ -49,5 +49,10 @@ public sealed class CellGraph
return LandCell.Synthesize(id, t.Terrain, t.Origin, idx / 8, idx % 8);
}
/// <summary>
/// Resolve the cell on the far side of a portal — retail CCellPortal::GetOtherCell =
/// GetVisible(other_cell_id). <paramref name="cell"/> documents the traversal source and is
/// reserved for the OtherCellPtr neighbor cache (Stage 3); the lookup keys only on the portal.
/// </summary>
public ObjCell? Neighbor(ObjCell cell, in CellPortal portal) => GetVisible(portal.OtherCellId);
}