give gambling badges for roulette too (testing on devrama)
parent
fb758004c8
commit
835e1f6155
|
@ -22,6 +22,8 @@ class CasinoGame(Base):
|
|||
kind = Column(String)
|
||||
game_state = Column(JSON)
|
||||
|
||||
user = relationship("User")
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
if "created_utc" not in kwargs:
|
||||
kwargs["created_utc"] = int(time.time())
|
||||
|
|
|
@ -8,6 +8,7 @@ from flask import g
|
|||
from files.classes.casino_game import CasinoGame
|
||||
from files.helpers.alerts import *
|
||||
from files.helpers.get import get_account
|
||||
from files.helpers.casino import distribute_wager_badges
|
||||
|
||||
class RouletteAction(str, Enum):
|
||||
STRAIGHT_UP_BET = "STRAIGHT_UP_BET",
|
||||
|
@ -209,6 +210,8 @@ def spin_roulette_wheel():
|
|||
else:
|
||||
game.winnings = -game.wager
|
||||
|
||||
distribute_wager_badges(game.user, game.wager, won=(game.winnings > 0))
|
||||
|
||||
game.active = False
|
||||
g.db.add(game)
|
||||
|
||||
|
|
Loading…
Reference in New Issue