From cd811d7b9d99a21995f6fe31077030627aa23a94 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 28 Jun 2022 02:54:44 +0200 Subject: [PATCH] consistent lottershe naming --- files/helpers/lottery.py | 10 +++++----- files/templates/comments.html | 2 +- files/templates/header.html | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files/helpers/lottery.py b/files/helpers/lottery.py index f5449e372..c2143abd9 100644 --- a/files/helpers/lottery.py +++ b/files/helpers/lottery.py @@ -48,10 +48,10 @@ def end_lottery_session(): for user in participating_users: chance_to_win = user.currently_held_lottery_tickets / len(raffle) * 100 if user.id == winner: - notification_text = f'You won {active_lottery.prize} coins in the lottery! ' \ + notification_text = f'You won {active_lottery.prize} coins in the lottershe! ' \ + f'Congratulations!\nYour odds of winning were: {chance_to_win}%' else: - notification_text = f'You did not win the lottery. Better luck next time!\n' \ + notification_text = f'You did not win the lottershe. Better luck next time!\n' \ + f'Your odds of winning were: {chance_to_win}%\nWinner: @{winning_user.username} (won {active_lottery.prize} coins)' send_repeatable_notification(user.id, notification_text) user.currently_held_lottery_tickets = 0 @@ -92,7 +92,7 @@ def lottery_ticket_net_value(): def purchase_lottery_tickets(v, quantity=1): if quantity < 1: - return False, "Must purchase one or more lottery tickets." + return False, f"Must purchase one or more lottershe tickets." elif (v.coins < LOTTERY_TICKET_COST * quantity): return False, f'Lottery tickets cost {LOTTERY_TICKET_COST} coins each.' @@ -109,8 +109,8 @@ def purchase_lottery_tickets(v, quantity=1): most_recent_lottery.tickets_sold += quantity - if quantity == 1: return True, f'Successfully purchased {quantity} lottery ticket!' - return True, f'Successfully purchased {quantity} lottery tickets!' + if quantity == 1: return True, f'Successfully purchased {quantity} lottershe ticket!' + return True, f'Successfully purchased {quantity} lottershe tickets!' def grant_lottery_tickets_to_user(v, quantity): active_lottery = get_active_lottery() diff --git a/files/templates/comments.html b/files/templates/comments.html index 515c5ad01..ec9d9d3ca 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -235,7 +235,7 @@ {% if c.treasure_amount and c.treasure_amount != '0' %} {% if c.treasure_amount.startswith('l') %} treasure - Found {{c.treasure_amount.replace('l', '')}} {{'Lottershe' if SITE_NAME == 'rDrama' else 'Lottery'}} Tickets! + Found {{c.treasure_amount.replace('l', '')}} Lottershe Tickets! {% elif '-' in c.treasure_amount %} treasure A Mimic Ate {{c.treasure_amount.replace('-', '')}} Coins! diff --git a/files/templates/header.html b/files/templates/header.html index 365942e99..d4a705f5b 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -90,7 +90,7 @@ {% endif %} {% if v and v.can_gamble and LOTTERY_ENABLED %} - + @@ -143,7 +143,7 @@ + title="Lottershe">