allow ppl to make holes w/ mbux

master
Aevann 2023-03-07 07:07:23 +02:00
parent 1025c32322
commit 6bb35b3d2f
2 changed files with 4 additions and 4 deletions

View File

@ -365,8 +365,8 @@ def create_sub2(v):
sub = get_sub_by_name(name, graceful=True)
if not sub:
if not v.charge_account('coins', HOLE_COST):
return redirect(f"/create_hole?error=You don't have enough coins!")
if not v.charge_account('combined', HOLE_COST):
return redirect(f"/create_hole?error=You don't have enough coins or marseybux!")
g.db.add(v)
if v.shadowbanned: abort(500)

View File

@ -19,9 +19,9 @@
<span class="text-danger text-small" style="vertical-align: sub;">{{error}}</span>
</p>
{% endif %}
<button type="submit" class="btn btn-primary ml-auto" {% if cost > v.coins %}disabled{% endif %}>Create {{HOLE_NAME|capitalize}}</button>
<button type="submit" class="btn btn-primary ml-auto" {% if cost > v.coins + v.marseybux %}disabled{% endif %}>Create {{HOLE_NAME|capitalize}}</button>
</div>
<p class="mt-2 mr-1" style="float: right"><b>Cost</b>: {{cost}} coins</p>
<p class="mt-2 mr-1" style="float: right"><b>Cost</b>: {{cost}} coins or marseybux</p>
</div>
</div>
</div>