hide highest roller badge

master
Aevann 2024-04-16 17:12:03 +02:00
parent 43f0d9bb68
commit e419088ef9
2 changed files with 6 additions and 8 deletions

View File

@ -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

View File

@ -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