Repository navigation
Contract the passage, a transition the party walks through - #153
Merged
Merged
Conversation
Adds the "passage" kind and a side field to TransitionSpec, a LevelSpec.passage_at stub, the passage to the spec's adventure model, and phase 17 to the roadmap. tests/test_passages.py holds the acceptance tests, marked xfail with "chunk: passage". They pin the crossing events in order, each move that fires nothing, the gate, the player view, the save round trip, and the exact validate_adventure lines, which osr-editor's diagnostics match by pattern. osr-forge's map tracing and re-pod's level splitting need passages, and they ship in osrlib 2.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the contract for passages. A passage is a transition the party crosses by walking across one side of its cell, instead of taking it with
UseStairs. osr-forge's map tracing needs it to join two levels whose floors meet on one map, and re-pod writes each passage as a FRUA transfer. The cross-project plan isdocs/plans/map-tracing.mdin re-pod, under "Passages".What's here:
TransitionSpec.kindgains"passage", andTransitionSpecgainsside: Direction | None = None.LevelSpec.passage_at(position, side)is a stub that raisesNotImplementedError("chunk: passage").docs/spec.mddescribes the passage in the adventure model and adds phase 17 to the roadmap.tests/test_passages.pyhas the acceptance tests, all markedxfail(reason="chunk: passage").uv run pytest --runxfail tests/test_passages.pyshows 32 failing on behavior and 5 that pass today.The tests pin the order of a crossing's events, each move that fires nothing, the gate's refusal and toll, the player view's open side, a save and a replay through a passage, and the exact
validate_adventureline for each refusal. osr-editor's diagnostics match osrlib's messages by pattern, so those lines are part of the contract.Nothing moves
SCHEMA_VERSION. A new kind value and an optional field are additive within schema 4, andmainis unreleased at schema 4.Checked locally:
ruff format --check,ruff check,pyright(0 errors),pytest(2951 passed, 146 skipped, 32 xfailed, 5 xpassed), andmkdocs build --strict.