kill all forgetful cunts

pull/171/head
Aevann 2023-07-14 06:53:15 +03:00
parent 245761b5d5
commit 6395092618
3 changed files with 6 additions and 9 deletions

View File

@ -210,8 +210,7 @@ def spin_roulette_wheel():
else:
game.winnings = -game.wager
if game.currency == 'coins':
distribute_wager_badges(game.user, game.wager, won=(game.winnings > 0))
distribute_wager_badges(game.user, game.wager, won=(game.winnings > 0))
game.active = False
g.db.add(game)

View File

@ -32,8 +32,7 @@ def casino_slot_pull(gambler, wager_value, currency):
gambler.pay_account(currency, reward)
if currency == 'coins':
distribute_wager_badges(gambler, wager_value, won=(payout > 0))
distribute_wager_badges(gambler, wager_value, won=(payout > 0))
symbols = build_symbols(payout)
text = build_text(wager_value, payout, currency)

View File

@ -257,11 +257,10 @@ def handle_payout(gambler, state, game):
gambler.pay_account(game.currency, payout)
if game.currency == 'coins':
if status in {BlackjackStatus.BLACKJACK, BlackjackStatus.WON}:
distribute_wager_badges(gambler, game.wager, won=True)
elif status == BlackjackStatus.LOST:
distribute_wager_badges(gambler, game.wager, won=False)
if status in {BlackjackStatus.BLACKJACK, BlackjackStatus.WON}:
distribute_wager_badges(gambler, game.wager, won=True)
elif status == BlackjackStatus.LOST:
distribute_wager_badges(gambler, game.wager, won=False)
game.active = False
g.db.add(game)