Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

## [Unreleased]

## [2.8.0] - 2026-11-25

### Added

- [`MapFeatureView.emptied`][osrlib.crawl.views.MapFeatureView.emptied] is true for an authored treasure cache the party has emptied (#316). The cache stays in `features` under the same `id` and description, so a client can draw it opened, and the flag is true exactly when `TakeTreasure` would refuse the cache with `exploration.feature.emptied`. Before, the view's feature list didn't mark an emptied cache, so a client kept offering it.
Expand Down Expand Up @@ -710,7 +712,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
- The documentation site: quickstart, guides, front-end walk-throughs, and a full reference for every command, event, rejection code, message code, RNG stream, and content id.
- The typed surface: complete type hints under `py.typed`, checked in CI.

[Unreleased]: https://github.com/mmacy/osrlib-python/compare/v2.7.0...HEAD
[Unreleased]: https://github.com/mmacy/osrlib-python/compare/v2.8.0...HEAD
[2.8.0]: https://github.com/mmacy/osrlib-python/compare/v2.7.0...v2.8.0
[2.7.0]: https://github.com/mmacy/osrlib-python/compare/v2.6.0...v2.7.0
[2.6.0]: https://github.com/mmacy/osrlib-python/compare/v2.5.1...v2.6.0
[2.5.1]: https://github.com/mmacy/osrlib-python/compare/v2.5.0...v2.5.1
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "osrlib"
version = "2.7.0"
version = "2.8.0"
description = "B/X (1981 Basic/Expert) tabletop RPG rules engine for turn-based dungeon crawlers"
readme = "README.md"
# The wheel ships Open Game Content (osrlib/data/*.json and its LICENSE-OGL.md
Expand Down
2 changes: 1 addition & 1 deletion tests/crawl_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def build_gated_adventure() -> Adventure:
FeatureSpec(
id="vault",
kind="treasure_cache",
description="A ferryman's strongbox.",
description="An iron strongbox.",
cell=(1, 0),
item_ids=("silver_seal",),
),
Expand Down
8 changes: 4 additions & 4 deletions tests/test_can_back_stab.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,16 +576,16 @@ def test_a_planned_move_doesnt_change_who_can_back_stab_in_the_free_round(self):
# ---------------------------------------------------------------------- the guides


def _unreleased() -> str:
def _released_in_2_8_0() -> str:
changelog = (REPO / "CHANGELOG.md").read_text()
match = re.search(r"^## \[Unreleased\]\n(.*?)^## \[", changelog, flags=re.S | re.M)
match = re.search(r"^## \[2\.8\.0\][^\n]*\n(.*?)^## \[", changelog, flags=re.S | re.M)
assert match is not None
return match.group(1)


def test_the_changelog_records_the_new_lists():
unreleased = _unreleased()
bullet = next((line for line in unreleased.splitlines() if "(#319)" in line), "")
released = _released_in_2_8_0()
bullet = next((line for line in released.splitlines() if "(#319)" in line), "")
assert "EncounterView.can_back_stab" in bullet
assert "BattleRoundPreview.can_hide" in bullet
assert "BattleRoundPreview.can_back_stab" in bullet
Expand Down
10 changes: 5 additions & 5 deletions tests/test_feature_description_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ def test_the_guide_links_the_two_audiences():
assert "][osrlib.crawl.dungeon.FeatureSpec.referee_notes]" in text


def test_the_unreleased_changelog_tells_an_upgrading_author():
# One bullet under Unreleased says that the players read a cache's description since 2.6.0
# and names the new field. No released section is rewritten to say it.
def test_the_changelog_tells_an_upgrading_author():
# One bullet under 2.8.0 says that the players read a cache's description since 2.6.0
# and names the new field. No other section is rewritten to say it.
sections = _changelog_sections()
bullets = [line for line in sections["Unreleased"].splitlines() if line.startswith("- ")]
bullets = [line for line in sections["2.8.0"].splitlines() if line.startswith("- ")]
matching = [line for line in bullets if "2.6.0" in line and "referee_notes" in line and "#318" in line]
assert len(matching) == 1, bullets
for name, text in sections.items():
if name != "Unreleased":
if name != "2.8.0":
assert "referee_notes" not in text, name
6 changes: 3 additions & 3 deletions tests/test_view_spell_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,9 @@ def test_the_views_guide_and_the_changelog_describe_the_lists():
root = Path(__file__).parent.parent
guide = (root / "docs" / "guides" / "views-and-visibility.md").read_text()
changelog = (root / "CHANGELOG.md").read_text()
unreleased = changelog.split("## [Unreleased]", 1)[1].split("\n## [", 1)[0]
released = changelog.split("## [2.8.0]", 1)[1].split("\n## [", 1)[0]

for name in ("preparable_spells", "learnable_spells", "spell_slots", "spell_levels"):
assert name in guide, name
assert name in unreleased, name
assert "#326" in unreleased
assert name in released, name
assert "#326" in released
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading