8000 fix(inventory): align currency and carrying capacity by Mnehmos · Pull Request #80 · Mnehmos/mnehmos.rpg.mcp · GitHub
[go: up one dir, main page]

Skip to content

fix(inventory): align currency and carrying capacity - #80

Merged
Mnehmos merged 1 commit into
mainfrom
fix/inventory-character-consistency
Aug 13, 2026
Merged

Mnehmos merged 1 commit into
mainfrom
fix/inventory-character-consistency

Conversation

@Mnehmos
@Mnehmos Mnehmos commented Aug 13, 2026 •
Copy link
Copy Markdown
Owner

Risk

R2: reference character persistence and inventory read projection.

Acceptance criteria

  • Character currency survives schema validation and repository create/get/update.
  • Detailed inventory exposes full denomination currency values.
  • Carrying capacity derives from Strength at 15 lb per point.
  • Spawned characters include canonical zero currency.

Verification

  • npm test -- tests/server/consolidated/inventory-manage.test.ts tests/server/consolidated/character-manage.test.ts (98 passed)
  • npm run build
  • npm test (2308 passed, 7 skipped)

Summary by CodeRabbit

  • New Features

    • Added gold, silver, and copper currency tracking for characters.
    • Currency now appears in detailed inventory information and persists across character creation and updates.
    • Spawned characters begin with zero currency.
    • Inventory capacity now scales with a character’s Strength score.
  • Bug Fixes

    • Invalid or missing character stats now result in zero inventory capacity.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
coderabbitai Bot commented Aug 13, 2026 •
Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d2e50cb-efc7-47e8-bfd4-a8f2d4a24bfa

📥 Commits

Reviewing files that changed from the base of the PR and between 61f72ea and 78e3a64.

📒 Files selected for processing (6)
  • src/schema/character.ts
  • src/server/consolidated/inventory-manage.ts
  • src/server/consolidated/spawn-manage.ts
  • src/storage/repos/character.repo.ts
  • src/storage/repos/inventory.repo.ts
  • tests/server/consolidated/inventory-manage.test.ts

📝 Walkthrough

Walkthrough

The change adds validated character currency, persists currency in character records, returns currency in detailed inventory data, and calculates inventory capacity from Strength.

Changes

Character and inventory updates

Layer / File(s) Summary
Currency schema and persistence
src/schema/character.ts, src/server/consolidated/spawn-manage.ts, src/storage/repos/character.repo.ts
CurrencySchema validates nonnegative gold, silver, and copper values. Spawned characters receive zeroed currency. Character creation, updates, and row conversion store and restore currency JSON.
Inventory capacity and currency response
src/storage/repos/inventory.repo.ts, src/server/consolidated/inventory-manage.ts, tests/server/consolidated/inventory-manage.test.ts
Inventory capacity is calculated as max(0, trunc(Strength) * 15). Detailed inventory data returns currency denominations. Tests verify capacity 210 and the currency values.

Estimated code review effort: 3 (Moderate) | ~20 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/inventory-character-consistency

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Mnehmos
Mnehmos merged commit e16711f into main Aug 13, 2026
3 of 4 checks passed
zxrfire pushed a commit to zxrfire/mnehmos.rpg.mcp that referenced this pull request Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0