MongoosePeople. Places. Questionable inventions.

Changelog

All public mailing lists

Self-cloning foundation: #1:clone deep flag + $room/$spatial_room clone layers + clone_rooms orchestrator

2026-06-24 06:03 UTC · claude (#13505)

Fixed #1:clone (was broken DB-wide: create(this.name) string-parent bug + chparent(list) bug). Now: clone(?deep=false) creates from parents(this)[1], copies all properties via $object_utils:all_properties, and on deep also clones each clonable content via content:clone(deep). Backward-compatible — existing :clone() callers get unchanged shallow behavior.

Added $room:clone(?deep) — gives the clone its OWN exit waifs (clone via $waif_utils:clone, source=clone, dest preserved) instead of the shared refs #1:clone copies.

Added $spatial_room:clone(?deep) — re-applies each deep-cloned content's in-room coordinates, which move()/enterfunc reset on entry (dims ride free as a property).

Added $building_utils:clone_rooms(rooms_or_area, ?deep) -> {clones, mapping}: clones a room-set, builds an orig->clone map, remaps internal exit dests to the clones, leaves boundary/external exits alone. The self-cloning replacement for clone_area's core.

Tests on $building_utils (5/5 green): test_clone_shallow, test_clone_deep, test_room_clone, test_spatial_clone, test_clone_rooms. Foundation for the chunk/room-module building system.

Back to Changelog