consistent lottershe naming

master
Aevann1 2022-06-28 02:54:44 +02:00
parent 4fae28a2a2
commit cd811d7b9d
3 changed files with 8 additions and 8 deletions

View File

@ -48,10 +48,10 @@ def end_lottery_session():
for user in participating_users: for user in participating_users:
chance_to_win = user.currently_held_lottery_tickets / len(raffle) * 100 chance_to_win = user.currently_held_lottery_tickets / len(raffle) * 100
if user.id == winner: 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}%' + f'Congratulations!\nYour odds of winning were: {chance_to_win}%'
else: 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)' + 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) send_repeatable_notification(user.id, notification_text)
user.currently_held_lottery_tickets = 0 user.currently_held_lottery_tickets = 0
@ -92,7 +92,7 @@ def lottery_ticket_net_value():
def purchase_lottery_tickets(v, quantity=1): def purchase_lottery_tickets(v, quantity=1):
if 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): elif (v.coins < LOTTERY_TICKET_COST * quantity):
return False, f'Lottery tickets cost {LOTTERY_TICKET_COST} coins each.' 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 most_recent_lottery.tickets_sold += quantity
if quantity == 1: return True, f'Successfully purchased {quantity} lottery ticket!' if quantity == 1: return True, f'Successfully purchased {quantity} lottershe ticket!'
return True, f'Successfully purchased {quantity} lottery tickets!' return True, f'Successfully purchased {quantity} lottershe tickets!'
def grant_lottery_tickets_to_user(v, quantity): def grant_lottery_tickets_to_user(v, quantity):
active_lottery = get_active_lottery() active_lottery = get_active_lottery()

View File

@ -235,7 +235,7 @@
{% if c.treasure_amount and c.treasure_amount != '0' %} {% if c.treasure_amount and c.treasure_amount != '0' %}
{% if c.treasure_amount.startswith('l') %} {% if c.treasure_amount.startswith('l') %}
<img class="treasure" alt="treasure" src="/i/treasure_tickets.webp" width="20" /> <img class="treasure" alt="treasure" src="/i/treasure_tickets.webp" width="20" />
<em>Found {{c.treasure_amount.replace('l', '')}} {{'Lottershe' if SITE_NAME == 'rDrama' else 'Lottery'}} Tickets!</em> <em>Found {{c.treasure_amount.replace('l', '')}} Lottershe Tickets!</em>
{% elif '-' in c.treasure_amount %} {% elif '-' in c.treasure_amount %}
<img class="treasure" alt="treasure" src="/i/treasure_mimic.webp" width="20" /> <img class="treasure" alt="treasure" src="/i/treasure_mimic.webp" width="20" />
<em>A Mimic Ate {{c.treasure_amount.replace('-', '')}} Coins!</em> <em>A Mimic Ate {{c.treasure_amount.replace('-', '')}} Coins!</em>

View File

@ -90,7 +90,7 @@
{% endif %} {% endif %}
{% if v and v.can_gamble and LOTTERY_ENABLED %} {% if v and v.can_gamble and LOTTERY_ENABLED %}
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title={{'Lottershe' if SITE_NAME == 'rDrama' else 'Lottery'}}> <span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Lottershe">
<a <a
href="/lottery" href="/lottery"
class="mobile-nav-icon d-md-none"> class="mobile-nav-icon d-md-none">
@ -143,7 +143,7 @@
<span <span
data-bs-toggle="tooltip" data-bs-toggle="tooltip"
data-bs-placement="bottom" data-bs-placement="bottom"
title={{'Lottershe' if SITE_NAME == 'rDrama' else 'Lottery'}}> title="Lottershe">
<a <a
href="/lottery" href="/lottery"
class="nav-link"> class="nav-link">