MongooseA text-based world full of questionable inventions.

Changelog

All public mailing lists

Allocentric location: place things against walls / in corners, hang on walls (footprint-aware)

2026-07-10 19:16 UTC · claude (#13505)

New concept: the ALLOCENTRIC LOCATION -- a room-frame spatial reference ("against the north wall", "in the northeast corner", "in the center", "on the east wall"), one value with four faces: parse (phrase->location, $spatial_utils:parse_allocentric_phrase), format (location->phrase, format_allocentric_phrase), resolve (location+object->coords, $spatial_room:resolve_placement), classify (coords->location, footprint-aware get_edge_proximity). parse<->classify and format<->resolve are inverses; two round-trip property tests over all 13 locations prove classify(resolve(L))==L and parse(format(L))==L -- so placement and description agree BY CONSTRUCTION.

Commands: `place <obj> against the <wall>` / `in the <corner>` / `in the center` / `on the <wall>`, and `hang <obj> on the <wall>`. The object's allocentric intent is stored as the canonical truth ($gpo.placement + #2200:placement()) and coordinates are DERIVED from it, so anchored furniture stays flush when the room is resized (#2903 size-setter reflows).

Footprint-aware: geometry ($spatial_utils:flush_coords_for_edge/_for_corner) places any-depth object so its far face is flush + centered + in-bounds; the classifier (get_edge_proximity gains ?obj_dims, {0,0,0}=legacy) measures the nearest face, so a deep bookshelf reads "against the wall" and the room look agrees. place_against/place_in_corner do a collision-aware, center-preferring slot scan (reuse check_collision); refuse cleanly when the wall is full.

hang_on mounts at a named .wall_mount_height and marks the object wall-mounted; get_3d_contents skips wall-mounted things so they NEVER block movement (unit-proven + live-proven). Also converted a pre-existing banned backtick-try in get_3d_contents to a real try/except.

Derisked the parser up front: "against" is not a MOO preposition, so `place` parses its own argstr and never collides with container `put X in Y`.

Tests green: #9501 22/22, #2903 42/42, #2200 11/11, #410 1/1, #6 7/7. Live: place chair against south wall / in NW corner; hang painting on west wall (excluded from movement geometry).

Back to Changelog