From c6675ff037a45ed47f78888b67f748528315212b Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sat, 5 Nov 2022 01:00:02 -0500 Subject: [PATCH] houses: make price a constant houses: warn founders that switching houses will delete their founder status --- files/helpers/const.py | 3 ++ files/routes/settings.py | 4 +-- files/templates/settings_profile.html | 49 ++++----------------------- 3 files changed, 12 insertions(+), 44 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index fe2bbc1ae..7b6bef96b 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -451,6 +451,9 @@ ANTISPAM_BYPASS_IDS = () PAGE_SIZE = 25 LEADERBOARD_LIMIT = PAGE_SIZE +HOUSE_JOIN_COST = 500 +HOUSE_SWITCH_COST = 2000 + if SITE.startswith('rdrama.'): FEATURES['PRONOUNS'] = True FEATURES['HOUSES'] = True diff --git a/files/routes/settings.py b/files/routes/settings.py index 78d5e9c50..e9f29aec3 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -277,9 +277,9 @@ def settings_profile_post(v): if v.bite: abort(403) if v.house: if v.house.replace(' Founder', '') == house: abort(409, f"You're already in House {house}") - cost = 2000 + cost = HOUSE_SWITCH_COST else: - cost = 500 + cost = HOUSE_JOIN_COST success = v.charge_account('coins', cost) if not success: diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 39951cb56..dd0b293e6 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -18,87 +18,52 @@
-
-
- - {% if FEATURES['HOUSES'] %}
House
-
-
-
{% if v.house %} - {% set cost=2000 %} -

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

+

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

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

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

+

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

+ {% endif %} + {% if ' Founder' in v.house %} +

Warning: you'll lose your founder status if you join a different house

{% endif %}
- -
- +
{% endif %} - - - - - - - - - - - - - - - - -
Theme
-
-
-
-
-
- Enable if you would like to display images and videos in full size on the frontpage. -
-
- -