five-on-it / packages/world/src/checks
packages/world/src/checks
The checks a level passes before anybody plays it (TECHNICAL_SPECS §9.4), as a library the platform's builds and the level gate (npm run level:check) run on every level: the rules of lintLevel (spawns on open ground, roads on what carries them), the budgets a room can afford (LEVEL_BUDGET, the light pieces within the simulation's entities among them), no road under water, and reachability: spawnReach answers whether a point can be reached from the spawn points, on foot over the layered navigation (the ground and the floors over it) or along a road (a bridge or a ramp the grid sees as a cliff still joins what it carries, at its own height: the street under a bridge stays apart).