Hexcrawl H4b: site detail writeup card on the World map#63
Merged
Conversation
…xSite/crawlSite/generateSite (H4b)
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.
H4b — Site detail card
Second slice of H4. A landmark on a hex (
HexCell.site, the type) gains a generated writeup— occupant/state + hook + features — shown in the World-map hex detail card. Two paths, mirroring
H2/H3/H4a: Crawl (reveal one writeup line at a time, cap 5) and Full (the 4-line writeup at
once). Inline on the World map; gated by the opt-in
hexcrawlflag; loggable to journal.What's in it
build_hexcrawl.py— authoredsiteOccupants/siteHooks/siteFeatures(10 each), withverify()coverage. Asset regenerated; verified in-sync.HexcrawlData— three site-detail getters.HexCell.siteLines(List<String>) — omit-when-empty JSON, tolerantmaybeFromJson,copyWithclearSiteLines.rollSiteLine(data, index, dice)(0 = occupant, 1 = hook, ≥2 = feature) +rollSiteDetail(4 ordered lines). The index→label mapping is the single source for both paths.
MapNotifier.setHexSite+crawlSite/generateSite— operate on the hex at (col,row),stored on the hex (never
MapState.rooms→ Dungeon tab untouched). Crawl caps at 5; Full sets 4;both no-op on site-less / absent hexes.
siteLines, and gatedCrawl site / Full site / Log buttons (only when the hex has a site). Reuses the H4a
card + the existing
Wrap(loose-constraint safe). No new screen/painter.Verification
dart analyze: clean.flutter test: 759 passing (+8: model round-trip,rollSiteLine/rollSiteDetail,crawlSitecap + no-op paths,generateSite, and 3 widget tests driving canvas-tap → site card →Full writeup).
Plan:
docs/superpowers/plans/2026-06-14-hexcrawl-site-detail.mdNext: H4c — site interior ("Enter" → small area map, both paths) — the final toolkit slice.
🤖 Generated with Claude Code