forked from rDrama/rDrama
dfs
parent
6fb8328b9c
commit
1bde12ce55
|
@ -61,6 +61,7 @@ class User(Base):
|
||||||
fail_utc = Column(Integer, default=0)
|
fail_utc = Column(Integer, default=0)
|
||||||
fail2_utc = Column(Integer, default=0)
|
fail2_utc = Column(Integer, default=0)
|
||||||
admin_level = Column(Integer, default=0)
|
admin_level = Column(Integer, default=0)
|
||||||
|
coins_spent = Column(Integer, default=0)
|
||||||
agendaposter = Column(Boolean, default=False)
|
agendaposter = Column(Boolean, default=False)
|
||||||
agendaposter_expires_utc = Column(Integer, default=0)
|
agendaposter_expires_utc = Column(Integer, default=0)
|
||||||
changelogsub = Column(Boolean, default=False)
|
changelogsub = Column(Boolean, default=False)
|
||||||
|
|
|
@ -318,6 +318,7 @@ def buy(v, award):
|
||||||
|
|
||||||
if v.coins < price: return {"error": "Not enough coins."}, 400
|
if v.coins < price: return {"error": "Not enough coins."}, 400
|
||||||
v.coins -= price
|
v.coins -= price
|
||||||
|
v.coins_spent += price
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
|
@ -316,6 +316,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
True score: {{u.truecoins}}
|
True score: {{u.truecoins}}
|
||||||
|
Coins spent: {{u.coins_spent}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if u.is_suspended %}
|
{% if u.is_suspended %}
|
||||||
<p>Banned by: <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a></p>
|
<p>Banned by: <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a></p>
|
||||||
|
@ -582,6 +583,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
True score: {{u.truecoins}}
|
True score: {{u.truecoins}}
|
||||||
|
Coins spent: {{u.coins_spent}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if u.is_suspended %}
|
{% if u.is_suspended %}
|
||||||
<p>Banned by: <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a></p>
|
<p>Banned by: <a href="{{u.banned_by.url}}">@{{u.banned_by.username}}</a></p>
|
||||||
|
|
Loading…
Reference in New Issue