From 0ec8f3692960a064616e630c914058298b22897b Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 3 Oct 2026 01:38:58 -0400 Subject: feat: replaced roulette wheel graphic with line-by-line 'spin' --- internal/game/casino.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'internal/game/casino.go') diff --git a/internal/game/casino.go b/internal/game/casino.go index 5e09d48..0b16114 100644 --- a/internal/game/casino.go +++ b/internal/game/casino.go @@ -539,6 +539,20 @@ func (g *Game) executeTableAction(sess *net.Session, action string) { g.emitCasinoEvents(g.Casino.Action(table.RoomID, table.Config.ID, p.Name, action)) } +// Keep the automatic post-command prompt out of a seated player's spin +// animation. Settlement menus resume prompting once the table leaves playing. +func (g *Game) rouletteSpinning(sess *net.Session) bool { + if g.Casino == nil || sess == nil || sess.Player == nil { + return false + } + table, playing := g.Casino.Participation(sess.Player.Name) + if !playing || table == nil || table.Config.Game != casino.GameRoulette { + return false + } + s, ok := table.Board(sess.Player.Name).(*casino.RouletteSnapshot) + return ok && s.Phase == "playing" +} + func (g *Game) CasinoTick() { if g.Casino != nil { g.emitCasinoEvents(g.Casino.Tick()) @@ -569,7 +583,10 @@ func (g *Game) emitCasinoEvents(events []casino.Event) { message := g.casinoProse(sess, category, g.casinoTimeText(event.Message)) if details { if rendered := g.renderCasinoSnapshot(sess, event.Snapshot); rendered != "" { - message += "\n" + rendered + if message != "" { + message += "\n" + } + message += rendered } } if message != "" { -- cgit v1.2.3