Shop discount QoL (#195)

master
BuckFromRdrama 2022-02-01 17:59:57 -05:00 committed by GitHub
parent da3db3d54a
commit eddbf6726d
2 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,7 @@ def shop(v):
if v.has_badge(badge): discount -= discounts[badge]
for val in AWARDS.values():
val["baseprice"] = int(val["price"])
val["price"] = int(val["price"]*discount)
sales = g.db.query(func.sum(User.coins_spent)).scalar()

View File

@ -60,7 +60,12 @@
<tr data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{a['description']}}">
<td><i class="{{a['icon']}} {{a['color']}}" style="font-size: 30px"></i></td>
<td style="font-weight: bold">{{a['title']}}</td>
{% if a['baseprice'] != a['price'] %}
<td style="font-weight: bold"><strike>{{a['baseprice']}}</strike> <em class="{{a['color']}}">{{a['price']}}</em></td>
{% endif %}
{% if a['baseprice'] == a['price'] %}
<td style="font-weight: bold">{{a['price']}}</td>
{% endif %}
<td style="font-weight: bold">{{a['owned']}}</td>
{% set kind = a['kind'] %}
<td style="font-weight: bold">