diff options
| author | historia <[not public]> | 2026-09-30 03:55:37 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-30 03:55:37 -0400 |
| commit | 735428f0667f67c12fdf3caca872d7dc65e2ce26 (patch) | |
| tree | 92c9931f223bfd50ced4f1954130d879640a435b /internal/casino/baccarat.go | |
| parent | ffc7b582e9c14fdc2e579b9239b5ff7ad9a0d90a (diff) | |
| download | thehouseoficarus-735428f0667f67c12fdf3caca872d7dc65e2ce26.tar.gz | |
feat: restyle roulette presentation
Diffstat (limited to 'internal/casino/baccarat.go')
| -rw-r--r-- | internal/casino/baccarat.go | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/internal/casino/baccarat.go b/internal/casino/baccarat.go index ad56da4..56677b2 100644 --- a/internal/casino/baccarat.go +++ b/internal/casino/baccarat.go @@ -186,7 +186,11 @@ func (t *baccaratTable) deal() []Event { // of a payout that was not durable. payoutFailed := settleStakeOutcome(p.Wallet, payout, []string{p.stakeID}, settleErr) publicResult, _ := baccaratResultMessages(p.Name, result, payout) - privateResult := resultText(result, p.Wager.Total, payout) + line := settlementLine{Label: p.lastSpot, Result: result, Stake: p.Wager.Total, Returned: payout} + if result == "win" && p.lastSpot == baccaratSpotTie { + line.Tag = "casino_jackpot_win" + } + privateResult := settlementText([]settlementLine{line}) if payoutFailed { privateResult = payoutFailedMessage() publicResult = p.Name + "’s settlement is pending recovery." @@ -195,11 +199,16 @@ func (t *baccaratTable) deal() []Event { // Returning players get their balance in the next bet menu; only // departures/sit-outs need it attached to the settlement. settlement.ShowBalance = !payoutFailed && (p.LeaveAfter || p.SitOutAfter || !p.Connected) - if result == "win" { - if p.lastSpot == baccaratSpotTie { - settlement.Color = "casino_jackpot_win" - } else { - settlement.Color = "casino_big_win" + if !payoutFailed { + switch { + case line.Tag != "": + settlement.Color = line.Tag + case result == "win": + settlement.Color = "casino_result_win" + case result == "push": + settlement.Color = "casino_result_push" + default: + settlement.Color = "casino_result_loss" } } events = append(events, settlement) |
