fix plural

master
Aevann 2024-03-06 03:58:39 +02:00
parent e6e6d2f7c4
commit 27d4117f0c
1 changed files with 5 additions and 1 deletions

View File

@ -109,7 +109,11 @@ def purchase_lottery_tickets(v, quantity=1):
if (most_recent_lottery is None):
return False, "There is no active lottery!"
if not v.charge_account('coins', LOTTERY_TICKET_COST * quantity, f'Cost of {quantity} lottery tickets')[0]:
charge_reason = f'Cost of {quantity} lottery ticket'
if quantity > 1:
charge_reason += 's'
if not v.charge_account('coins', LOTTERY_TICKET_COST * quantity, charge_reason)[0]:
return False, "You don't have enough coins"
v.currently_held_lottery_tickets += quantity