mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6330] [MERGED] feat(game): choose a ruleset at game creation (rulesets slice 4) #7139
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6330
Author: @kolacheee
Created: 9/18/2026
Status: ✅ Merged
Merged: 9/18/2026
Merged by: @kolacheee
Base:
staging← Head:feat/rulesets-setup📝 Commits (3)
0267297feat(game): choose a ruleset at game creation and copy sheets into the game0213882fix(game): keep a card's ruleset sheet through session conclude and in-game save, and give recruits oneacbbb05fix(game): address ruleset setup review findings📊 Changes
16 files changed (+787 additions, -28 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+9 -1)📝
docs/game/dice-and-skill-checks.md(+1 -1)📝
docs/game/getting-started.md(+14 -1)➕
packages/client/src/components/game/GameSetupRulesChooser.tsx(+155 -0)📝
packages/client/src/components/game/GameSetupWizard.tsx(+65 -1)📝
packages/client/src/components/game/GameSurface.tsx(+4 -1)📝
packages/client/src/lib/game-setup-share.ts(+41 -2)📝
packages/client/src/localization/locales/en.json(+12 -0)📝
packages/server/src/routes/game.routes.ts(+110 -7)📝
packages/server/src/services/game/name-normalization.ts(+1 -9)📝
packages/shared/src/features/rulesets/sheet-math.ts(+15 -5)📝
packages/shared/src/index.ts(+1 -0)📝
packages/shared/src/types/game.ts(+5 -0)➕
packages/shared/src/utils/character-lookup-name.ts(+15 -0)➕
scripts/regressions/game-ruleset-setup.regression.ts(+338 -0)📄 Description
Linked issue
Part of #6314 (slice 4 of 7; it does not close the issue). Builds on #6327 (slice 3, merged).
Why this change
What changed
GameSetupRulesChooser). It shows each ruleset's coverage summary and says when battles still use default combat. The Party step, where the persona and party are picked, then lists who Has a sheet and who Starts on a blank sheet (GameSetupRulesetSheetStatus).idis trusted.POST /game/createrebuilds theRulesetReffrom its own registry, refusesruleset_not_installed, and writesgameRulesetonly when a ruleset was chosen, so legacy metadata keeps its bytes.applyGameSetupPayload, so both setup entry points copy the same way: matched by normalized name, a blank default for a member without a sheet, and nothing written back to the library.normalizeCharacterLookupNamemoved to the shared package (the server file re-exports it, so no server caller changed). The sheet status builds the same one-sheet-per-normalized-name map the server builds, with the persona's sheet winning a name it shares with a party member, and it uses the same "reads as a sheet" test, so a stored value the game would replace with a blank sheet is not listed as ready.rulesetRefSchema. Importing waits for the installed-rulesets list, so a list that is still loading cannot read as "not installed" and drop a ruleset this install has.scripts/regressions/game-ruleset-setup.regression.ts, including a real create and/setup/apply-jsonrun against a really installed package.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Commands run locally by the agent:
pnpm check(exit 0),pnpm localization:check, and the regressionsgame-ruleset-setupandexperience-setup-config. The agent also opened the wizard on a scratch server on port 7820 and saw the Rules block beside Combat Preference, selected 5e, and saw the pinned and default-combat lines. That check was made before the sheet status moved to the Party step, so the moved block is covered by type checks and lint only. Five local CodeRabbit sweeps were run before opening; the last returned no findings.Still to verify by hand:
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs touched:
CHANGELOG.md,docs/game/getting-started.md, the plan. The[docs-i18n]follow-up is batched for the ruleset slices.UI evidence (if applicable)
To be added by a human: a screenshot of the Rules block.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.