Skip to content

Charge Late Chips for bartender drinks#400

Merged
mpiorowski merged 11 commits into
mainfrom
mateu/clubhouse_v3
Jul 4, 2026
Merged

Charge Late Chips for bartender drinks#400
mpiorowski merged 11 commits into
mainfrom
mateu/clubhouse_v3

Conversation

@mpiorowski

Copy link
Copy Markdown
Owner

Summary

  • Adds paid @bartender drink orders backed by Late Chips, with server-side price limits, a chip floor guard, and persistent per-user drink state.
  • Shows a decaying drunkenness tint on clubhouse username labels and chat author labels after users buy drinks.

Changes

  • Adds user_drinks persistence for drink count, lifetime spend, raw drunk points, and decay-at-read drunk level.
  • Adds ChipService::buy_drink to atomically debit chips and record buzz, with drink purchases written to the chip ledger.
  • Updates @bartender mentions to use structured AI order decisions for pour, offer, or chat; only successful pours charge chips.
  • Propagates drunk levels through the shared clubhouse lobby and chat row rendering.
  • Queues bartender banner messages so bursts of replies display one at a time instead of replacing each other.

Behavior notes

  • Drink prices are AI-selected but server-clamped to 100-2000 chips and cannot reduce a user below the 100-chip floor.
  • If the AI order call times out or the user can no longer afford the drink when charged, no chips are deducted.
  • Drunk points decay over time without a background sober-up write; active drunk state is periodically reseeded from the DB.

Feature flags

  • None

Screenshots / Video

  • Not included in this draft; attach before review.

Testing

  • Automated: Added coverage for drink decay/levels, drink ledger and chip-floor behavior, atomic drink purchase composition, bartender order parsing, lobby drunk-level decay, bartender banner queueing, and chat row cache invalidation for drunk tint changes. Not run here per repo policy.
  • Manual: Not run; PR draft generated from the provided diff context.

@mpiorowski mpiorowski merged commit 7610fce into main Jul 4, 2026
2 of 3 checks passed
@mpiorowski mpiorowski deleted the mateu/clubhouse_v3 branch July 4, 2026 20:16
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