diff options
| author | historia <[not public]> | 2026-09-24 20:06:41 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-24 20:07:31 -0400 |
| commit | 13db3e50cb6e29eedbf25416e5284bf08b0adefb (patch) | |
| tree | d5e9b99030b25cc7fc102288b694c133f8832f84 /internal/game/cmd_stop.go | |
| parent | d114c747a7672c7e4daab3a5b5f1b2f066ebc912 (diff) | |
| download | thehouseoficarus-13db3e50cb6e29eedbf25416e5284bf08b0adefb.tar.gz | |
feat: casino table ux: aliases, rebet hints, deadline notifications, spectator mode
Diffstat (limited to 'internal/game/cmd_stop.go')
| -rw-r--r-- | internal/game/cmd_stop.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/game/cmd_stop.go b/internal/game/cmd_stop.go index 4b287ce..2f2a7ee 100644 --- a/internal/game/cmd_stop.go +++ b/internal/game/cmd_stop.go @@ -10,7 +10,17 @@ func (g *Game) executeStop(sess *net.Session, args []string, rawInput string) { // queue; cancel a pending quit countdown explicitly. g.cancelRest(p.Name) if _, playing := g.Casino.Participation(p.Name); playing { - g.leaveCasinoGames(p) + if table, _ := g.Casino.Participation(p.Name); table != nil { + // Normal leave refuses committed wagers. Only an explicit stop + // queues a departure; movement/quit retain their existing policy. + events := g.Casino.Leave(table.RoomID, table.Config.ID, p.Name) + if _, stillSeated := g.Casino.Participation(p.Name); stillSeated { + events = g.Casino.Action(table.RoomID, table.Config.ID, p.Name, "leave_after") + } + g.emitCasinoEvents(events) + } else { + g.leaveCasinoGames(p) + } return } ss, _ := g.safespot.Get(p.Name) |
