From e419088ef9d27f161e0bb52ac1566fdd1c53a83a Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 16 Apr 2024 17:12:03 +0200 Subject: [PATCH] hide highest roller badge --- files/classes/user.py | 6 ++---- files/helpers/config/const.py | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index d070a94fd..a0f574662 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -1417,7 +1417,7 @@ class User(Base): badges = self.badges if not self.lifetimedonated_visible and not (v and (v.id == self.id or v.admin_level >= PERMS['VIEW_PATRONS'])): - badges = [x for x in badges if x.badge_id not in {22, 23, 24, 25, 26, 27, 28, 257, 258, 259, 260, 261}] + badges = [x for x in badges if x.badge_id not in PATRON_BADGES] return sorted(badges, key=badge_ordering_func) @@ -1437,9 +1437,7 @@ class User(Base): return g.db.query(Post).filter_by(author_id=self.id, effortpost=True).count() -badge_ordering_tuple = ( - 22, 23, 24, 25, 26, 27, 28, #paypig - 257, 258, 259, 260, 261, #lifetime donation +badge_ordering_tuple = PATRON_BADGES + ( 134, 237, #1 year and 2 year 10, 11, 12, #referred users 69, 70, 71, 72, 73, #coins spent diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index e1683a217..16f156348 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -622,7 +622,7 @@ LEADERBOARD_LIMIT = PAGE_SIZE HOUSE_JOIN_COST = 500 HOUSE_SWITCH_COST = 2000 -PATRON_BADGES = {22,23,24,25,26,27,28,257,258,259,260,261} +PATRON_BADGES = (22,23,24,25,26,27,28,257,258,259,260,261,294) TIER_TO_NAME = { 1: "Beneficiary", @@ -655,12 +655,12 @@ TIER_TO_MUL = { 8: 800, } -BADGE_BLACKLIST = { # only grantable by admins higher than PERMS['IGNORE_BADGE_BLACKLIST'] +BADGE_BLACKLIST = PATRON_BADGES + ( # only grantable by admins higher than PERMS['IGNORE_BADGE_BLACKLIST'] 1, 2, 6, 10, 11, 12, # Alpha, Verified Email, Beta, Recruiter x3 - 16, 17, 143, 21, 22, 23, 24, 25, 26, 27, # Marsey Artist x3 / Patron Tiers + 16, 17, 143, # Marsey Artist x3 94, 95, 96, 97, 98, 109, 67, 68, 83, 84, 87, 90, 179, 185, # Award Status except Y'all-seeing eye 137, # Lottery Winner -} +) if SITE in {'rdrama.net', 'staging.rdrama.net'}: NOTIFICATION_SPAM_AGE_THRESHOLD = 0.5 * 86400