Skip to content

v0.7.0: Previous passages and dynamic navigation

Choose a tag to compare

@katelouie katelouie released this 12 Jan 21:27
· 48 commits to main since this release

Added

  • @prev Target - Navigate back to the previous passage
    • Use -> @prev in jumps or + [Go back] -> @prev in choices
    • Tracks the immediately previous passage (not decision points like undo)
    • Perfect for menus, inventory screens, side conversations, shop interfaces
    • Works with automatic jumps: in chain A -> B -> C, @prev from C goes to B
    • Persists through save/load (previous_passage_id in save data)
    • Included in GameSnapshot for correct undo/redo behavior
    • Clear error message if used at story start (no previous passage exists)
    • @prev added to reserved targets alongside @join
    • pytest tests: tests/test_prev_target.py (11 tests)