From 1d500917ad544e34a85c6b0ff0e53d1cd8feec12 Mon Sep 17 00:00:00 2001 From: TLSM Date: Mon, 27 Jun 2022 00:09:32 -0400 Subject: [PATCH] Improve header currency display style. --- files/helpers/const.py | 6 ++++++ files/helpers/jinja2.py | 3 ++- files/templates/header.html | 8 ++++---- files/templates/shop.html | 2 +- files/templates/userpage.html | 8 ++++---- files/templates/util/assetcache.html | 2 +- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 44605640b..61c906678 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -184,6 +184,7 @@ BUG_THREAD = 0 POLL_THREAD = 0 WELCOME_MSG = f"Welcome to {SITE_NAME}!" ROLES={} +PROCOINS_ENABLED = True LOTTERY_ENABLED = True LOTTERY_TICKET_COST = 12 @@ -285,6 +286,7 @@ elif SITE == 'cringetopia.org': "6": "947236351445725204", "7": "886781932430565418", } + PROCOINS_ENABLED = False elif SITE == 'watchpeopledie.co': HOLE_NAME = 'flair' HOLE_STYLE_FLAIR = True @@ -295,6 +297,8 @@ elif SITE == 'watchpeopledie.co': CARP_ID = 13 AEVANN_ID = 9 SNAKES_ID = 32 + + PROCOINS_ENABLED = False else: # localhost or testing environment implied pass @@ -727,6 +731,8 @@ if SITE == 'pcmemes.net': AWARDS_DISABLED.remove('ghost') elif SITE_NAME == 'WPD': AWARDS_DISABLED.remove('lootbox') +if not PROCOINS_ENABLED: + AWARDS_DISABLED.append('benefactor') AWARDS2 = {x: AWARDS[x] for x in AWARDS if x not in AWARDS_DISABLED} AWARDS3 = {x: AWARDS2[x] for x in AWARDS2 if AWARDS2[x]['price'] <= 500} diff --git a/files/helpers/jinja2.py b/files/helpers/jinja2.py index 48c94b846..093e052ea 100644 --- a/files/helpers/jinja2.py +++ b/files/helpers/jinja2.py @@ -57,4 +57,5 @@ def inject_constants(): "COLORS":COLORS, "ADMIGGERS":ADMIGGERS, "datetime":datetime, "time":time, "HOLE_NAME": HOLE_NAME, "HOLE_STYLE_FLAIR": HOLE_STYLE_FLAIR, "HOLE_REQUIRED": HOLE_REQUIRED, "LOTTERY_ENABLED": LOTTERY_ENABLED, "GUMROAD_LINK": GUMROAD_LINK, - "DEFAULT_THEME": DEFAULT_THEME, "DESCRIPTION": DESCRIPTION} + "DEFAULT_THEME": DEFAULT_THEME, "DESCRIPTION": DESCRIPTION, + "PROCOINS_ENABLED": PROCOINS_ENABLED,} diff --git a/files/templates/header.html b/files/templates/header.html index 3447e007c..a7b56f75f 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -169,10 +169,10 @@ {% endif %}
-
{{v.username}}
-
coins{{v.coins}} Coin{{ help.plural(v.coins) }}
- {% if SITE_NAME not in ('Cringetopia', 'WPD') %} -
marseybux{{v.procoins}} Marseybux
+
{{v.username}}
+
coins{{v.coins}}{% if not PROCOINS_ENABLED %} Coin{{ help.plural(v.coins) }}{% endif %}
+ {% if PROCOINS_ENABLED %} +
marseybux{{v.procoins}}
{% endif %}
diff --git a/files/templates/shop.html b/files/templates/shop.html index 5a1528999..34c4da878 100644 --- a/files/templates/shop.html +++ b/files/templates/shop.html @@ -25,7 +25,7 @@
Coins spent by you: {{v.coins_spent}} coins
Lootboxes bought by you: {{v.lootboxes_bought}} lootbox{{'es' if v.lootboxes_bought != 1}}
Your current coins: {{v.coins}}
- {% if SITE_NAME not in ('Cringetopia', 'WPD') %} + {% if PROCOINS_ENABLED %}
Your current marseybux: {{v.procoins}}
{% endif %} diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 92a31241e..c34df46ca 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -115,7 +115,7 @@ {{u.coins}} coins   - {% if SITE_NAME not in ('Cringetopia', 'WPD') %} + {% if PROCOINS_ENABLED %} {{u.procoins}} marseybux   {% endif %} @@ -183,7 +183,7 @@ Get them help Gift coins - {% if SITE_NAME not in ('Cringetopia', 'WPD') %} + {% if PROCOINS_ENABLED %} Gift Marseybux {% endif %} @@ -423,7 +423,7 @@ {{u.coins}} coins   - {% if SITE_NAME not in ('Cringetopia', 'WPD') %} + {% if PROCOINS_ENABLED %} {{u.procoins}} marseybux   {% endif %} @@ -504,7 +504,7 @@ Message Get them help Gift coins - {% if SITE_NAME not in ('Cringetopia', 'WPD') %} + {% if PROCOINS_ENABLED %} Gift Marseybux {% endif %} diff --git a/files/templates/util/assetcache.html b/files/templates/util/assetcache.html index c128860c2..767b34b48 100644 --- a/files/templates/util/assetcache.html +++ b/files/templates/util/assetcache.html @@ -1,6 +1,6 @@ {%- set CACHE_VER = { - 'css/main.css': 363, + 'css/main.css': 364, 'css/4chan.css': 61, 'css/classic.css': 61,