Skip to content

build --format json: kinds, properties and named exits beyond ROM - #25

Merged
ctoth merged 1 commit into
masterfrom
feat/mongoose-json
Oct 13, 2026
Merged

ctoth merged 1 commit into
masterfrom
feat/mongoose-json

Conversation

@ctoth

@ctoth ctoth commented Oct 13, 2026

Copy link
Copy Markdown
Owner

area-reader build --format json writes the area as the JSON the reader prints, in place of the .are file, so a source directory can say things a ROM area file has no place for.

  • kind, with and properties on the header, a room, a mob, an object or an exit. They appear under the same names on the record in the JSON.
  • An exit whose name is not one of the six directions is a named exit: any slug, one side, no door or key.
  • The ROM part is still rendered, parsed back and compared before anything is written.
  • --format rom (the default) refuses a source that uses any of this and names the first place it does.

For a plain source the JSON equals what area-reader AREA.are prints for the built area (tested on the example area).

Not in this PR: lint, walk and unbuild do not read the JSON, and no registry of kinds exists, so any slug is accepted.

Tests: 1722 passed, 11 of them new. ruff check clean.

…xits ROM cannot hold

build --format json writes the area as area-reader prints it. A header, room, mob, object or exit may name a kind, give it parameters with 'with', and set properties; an exit whose name is not a compass direction is a one-sided named exit. The ROM part is still rendered, parsed back and compared. --format rom refuses a source that uses any of this.
@ctoth
ctoth merged commit 0bf414e into master Oct 13, 2026
4 checks passed
@ctoth
ctoth deleted the feat/mongoose-json branch October 13, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant