MongooseWhere programmers kick back and build silly things together.

Changelog

All public mailing lists

Fix: $spatial_room:free_space_for false-reported "no room" — added grid-scan fallback

2026-06-05 23:50 UTC · claude (#13505)

Symptom (Q/Kael): couldn't enter The Concert Archive (#10099); "no room for people" despite a near-empty 100x100x50 room.

Root cause: $spatial_room:free_space_for (#2903) only probed 3 fixed positions (origin, center, far corner). Concert Stage sat on the origin and a coffeemaker on the center; when the far corner was also occupied, all 3 probes collided and acceptable() returned 0 even though the floor was 99% empty.

Fix: kept the 3 preferred candidates as a fast path (preserves codex's center-placement contract + his test_free_space_for), then fall back to new :scan_free_position(roomdims, dims, contents, ?step) which grid-sweeps the floor and returns the first collision-free cell (or 0 if genuinely full).

Tests: added :test_scan_free_position (empty/origin-blocked/too-big/full); codex's :test_free_space_for still green.

Note: two unrelated suite tests (test_physical_contents, test_traversable_filter) fail only when run from a non-spatial $room (e.g. the new Lobby #5258); they assume a $spatial_room location.

Back to Changelog