From b25e92913fdc880f69d1bb01d0e06a1cd4f7e162 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 24 Feb 2022 18:23:17 +0200 Subject: [PATCH] shittttt --- files/routes/settings.py | 7 ++- files/routes/subs.py | 2 +- files/templates/authforms.html | 4 +- files/templates/comments.html | 76 ++++++++++++------------- files/templates/default.html | 4 +- files/templates/log.html | 4 +- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/settings.html | 2 +- files/templates/settings2.html | 4 +- files/templates/settings_profile.html | 10 +++- files/templates/sidebar_2Much4You.html | 0 files/templates/sidebar_Drama.html | 18 +++++- files/templates/sidebar_PCM.html | 16 ++++++ files/templates/sidebar_Ruqqus.html | 16 ++++++ files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/sub/create_sub.html | 4 +- files/templates/submit.html | 4 +- seed-db.sql | 2 +- 20 files changed, 119 insertions(+), 62 deletions(-) delete mode 100644 files/templates/sidebar_2Much4You.html diff --git a/files/routes/settings.py b/files/routes/settings.py index 48f8879b7..8991bc9c1 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -340,8 +340,11 @@ def settings_profile_post(v): house = request.values.get("house") if house and house in ("None","Furry","Femboy","Vampire","Racist"): - if v.coins >= 2000: v.coins -= 2000 - elif v.procoins >= 2000: v.procoins -= 2000 + if v.house: cost = 2000 + else: cost = 500 + + if v.coins >= cost: v.coins -= cost + elif v.procoins >= cost: v.procoins -= cost else: abort(403) if house == "None": house = None diff --git a/files/routes/subs.py b/files/routes/subs.py index 9c38d33c9..7eaf4a73f 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -271,7 +271,7 @@ def create_sub2(v): sub = g.db.query(Sub).filter_by(name=name).one_or_none() if not sub: - cost = v.subs_created * 150 + cost = (v.subs_created+1) * 100 if v.coins < cost: return render_template("sub/create_sub.html", v=v, error="You don't have enough coins!"), 403 diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 5de5aa650..9630b904d 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/comments.html b/files/templates/comments.html index 22a2f41df..3e6f1de4e 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -660,63 +660,63 @@ diff --git a/files/templates/default.html b/files/templates/default.html index 2c9312875..6dc88e5c9 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% if sub and sub.css and not request.path.endswith('settings') %} diff --git a/files/templates/log.html b/files/templates/log.html index c9177cd00..a81236637 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,7 +6,7 @@ {% block content %} {% if v %} - + {% if v.agendaposter %} - + {% endif %}
diff --git a/files/templates/login.html b/files/templates/login.html index 5b88a9345..d826c83ca 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 66fa374a0..ec9f11d04 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{SITE_NAME}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index 174acbefa..2663b2f1e 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 5e993c8fc..56998f0a9 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -54,9 +54,15 @@
-

Change your house (cost: 2000 coins or marseybux).

+ {% if v.house %} + {% set cost=2000 %} +

Change your house (cost: {{cost}} coins or marseybux).

+ {% else %} + {% set cost=500 %} +

Join a house (cost: {{cost}} coins or marseybux).

+ {% endif %}
- {% for entry in ("None","Furry","Femboy","Vampire","Racist") %}
-

Cost: {{v.subs_created * 150}} coins

+

Cost: {{(v.subs_created+1) * 100}} coins

diff --git a/files/templates/submit.html b/files/templates/submit.html index d93a786be..2d33f49b0 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %} diff --git a/seed-db.sql b/seed-db.sql index 1c5cc1a77..01c299aac 100644 --- a/seed-db.sql +++ b/seed-db.sql @@ -54,7 +54,7 @@ INSERT INTO public.badge_defs VALUES (23,'Landchad','Contributed at least $20'), (24,'Terminally online turboautist','Contributed at least $50'), (25,'Footpig','Contributed at least $100'), -(26,'Rich Bich','Contributed at least $250'), +(26,'Rich Bich','Contributed at least $500'), (27,'Lolcow','Beautiful and valid milk provider'), (28,'Chud','Forced to use the chud theme'), (60,'Unironically Retarded','Demonstrated a wholesale inability to read the room'),