aboutsummaryrefslogtreecommitdiff
path: root/internal/game/casino.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/casino.go')
-rw-r--r--internal/game/casino.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/internal/game/casino.go b/internal/game/casino.go
index a0cc675..fa78c2a 100644
--- a/internal/game/casino.go
+++ b/internal/game/casino.go
@@ -354,9 +354,11 @@ 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 {
+// casinoAnimationBusy reports whether a seated player's game is mid-animation:
+// a spinning roulette wheel or Big 6 wheel, or a falling Plinko or Pachinko
+// ball. The automatic prompt stays out of that output and resumes when the
+// table settles.
+func (g *Game) casinoAnimationBusy(sess *net.Session) bool {
if g.Casino == nil || sess == nil || sess.Player == nil {
return false
}
@@ -364,8 +366,8 @@ func (g *Game) rouletteSpinning(sess *net.Session) bool {
if !playing || table == nil {
return false
}
- if table.Config.Game == casino.GameBigSix {
- return table.Busy(sess.Player.Name)
+ if table.Busy(sess.Player.Name) {
+ return true
}
if table.Config.Game != casino.GameRoulette {
return false
@@ -515,12 +517,13 @@ func (g *Game) casinoBoardReminder(sess *net.Session, category string, menu *cas
_, isCraps := snapshot.(*casino.CrapsSnapshot)
_, isPoker := snapshot.(*casino.VideoPokerSnapshot)
_, isPlinko := snapshot.(*casino.PlinkoSnapshot)
+ _, isPachinko := snapshot.(*casino.PachinkoSnapshot)
_, isCashHunt := snapshot.(*casino.CashHuntSnapshot)
_, isPaiGow := snapshot.(*casino.PaiGowSnapshot)
b, isBigSix := snapshot.(*casino.BigSixSnapshot)
isBigSix = isBigSix && b.Phase != "playing" && b.Phase != "result"
s, isRoulette := snapshot.(*casino.RouletteSnapshot)
- if !isCashHunt && !isPlinko && !isPoker && !isCraps && !isPaiGow && !isBigSix && (!isRoulette || s.Phase == "playing" || s.Phase == "result") {
+ if !isCashHunt && !isPlinko && !isPachinko && !isPoker && !isCraps && !isPaiGow && !isBigSix && (!isRoulette || s.Phase == "playing" || s.Phase == "result") {
return "", false
}
if isRoulette && sess.Player.OptionString("casino_display") == "compact" && (menu.Repeat || !menu.ShowBalance) {
@@ -617,6 +620,9 @@ func (g *Game) renderCasinoSnapshot(sess *net.Session, snapshot casino.Snapshot)
return renderCashHunt(s, mode, unicode, rtp)
case *casino.PlinkoSnapshot:
return renderPlinko(s, mode, unicode)
+ case *casino.PachinkoSnapshot:
+ precision, showOdds := g.casinoEdgePrecision(sess)
+ return renderPachinko(s, mode, unicode, showOdds, precision)
case *casino.PaiGowSnapshot:
return renderPaiGow(s, mode, unicode, size, sess.Player.OptionString("card_style"), g.CardArt)
case *casino.VideoPokerSnapshot: