diff --git a/files/assets/images/WPD/badges/21.webp b/files/assets/images/WPD/badges/21.webp deleted file mode 100644 index 36ff0bc10..000000000 Binary files a/files/assets/images/WPD/badges/21.webp and /dev/null differ diff --git a/files/assets/images/WPD/badges/22.webp b/files/assets/images/WPD/badges/22.webp index dea45cb5a..36ff0bc10 100644 Binary files a/files/assets/images/WPD/badges/22.webp and b/files/assets/images/WPD/badges/22.webp differ diff --git a/files/assets/images/WPD/badges/23.webp b/files/assets/images/WPD/badges/23.webp index 7046fffd4..dea45cb5a 100644 Binary files a/files/assets/images/WPD/badges/23.webp and b/files/assets/images/WPD/badges/23.webp differ diff --git a/files/assets/images/WPD/badges/24.webp b/files/assets/images/WPD/badges/24.webp index b8a3dc0d2..7046fffd4 100644 Binary files a/files/assets/images/WPD/badges/24.webp and b/files/assets/images/WPD/badges/24.webp differ diff --git a/files/assets/images/WPD/badges/25.webp b/files/assets/images/WPD/badges/25.webp index b9695ad54..b8a3dc0d2 100644 Binary files a/files/assets/images/WPD/badges/25.webp and b/files/assets/images/WPD/badges/25.webp differ diff --git a/files/assets/images/WPD/badges/26.webp b/files/assets/images/WPD/badges/26.webp index a6b9c5991..b9695ad54 100644 Binary files a/files/assets/images/WPD/badges/26.webp and b/files/assets/images/WPD/badges/26.webp differ diff --git a/files/assets/images/WPD/badges/27.webp b/files/assets/images/WPD/badges/27.webp index f5f19fdb9..a6b9c5991 100644 Binary files a/files/assets/images/WPD/badges/27.webp and b/files/assets/images/WPD/badges/27.webp differ diff --git a/files/assets/images/WPD/badges/28.webp b/files/assets/images/WPD/badges/28.webp new file mode 100644 index 000000000..f5f19fdb9 Binary files /dev/null and b/files/assets/images/WPD/badges/28.webp differ diff --git a/files/assets/images/badges/28.webp b/files/assets/images/badges/58.webp similarity index 100% rename from files/assets/images/badges/28.webp rename to files/assets/images/badges/58.webp diff --git a/files/assets/images/rDrama/badges/21.webp b/files/assets/images/rDrama/badges/21.webp deleted file mode 100644 index d1bb5f1d4..000000000 Binary files a/files/assets/images/rDrama/badges/21.webp and /dev/null differ diff --git a/files/assets/images/rDrama/badges/22.webp b/files/assets/images/rDrama/badges/22.webp index 106dbf403..d1bb5f1d4 100644 Binary files a/files/assets/images/rDrama/badges/22.webp and b/files/assets/images/rDrama/badges/22.webp differ diff --git a/files/assets/images/rDrama/badges/23.webp b/files/assets/images/rDrama/badges/23.webp index b36384d89..106dbf403 100644 Binary files a/files/assets/images/rDrama/badges/23.webp and b/files/assets/images/rDrama/badges/23.webp differ diff --git a/files/assets/images/rDrama/badges/24.webp b/files/assets/images/rDrama/badges/24.webp index a97570479..b36384d89 100644 Binary files a/files/assets/images/rDrama/badges/24.webp and b/files/assets/images/rDrama/badges/24.webp differ diff --git a/files/assets/images/rDrama/badges/25.webp b/files/assets/images/rDrama/badges/25.webp index 00a2a06cc..a97570479 100644 Binary files a/files/assets/images/rDrama/badges/25.webp and b/files/assets/images/rDrama/badges/25.webp differ diff --git a/files/assets/images/rDrama/badges/26.webp b/files/assets/images/rDrama/badges/26.webp index 11be6076c..00a2a06cc 100644 Binary files a/files/assets/images/rDrama/badges/26.webp and b/files/assets/images/rDrama/badges/26.webp differ diff --git a/files/assets/images/rDrama/badges/27.webp b/files/assets/images/rDrama/badges/27.webp index 4ae292f78..11be6076c 100644 Binary files a/files/assets/images/rDrama/badges/27.webp and b/files/assets/images/rDrama/badges/27.webp differ diff --git a/files/assets/images/rDrama/badges/28.webp b/files/assets/images/rDrama/badges/28.webp new file mode 100644 index 000000000..4ae292f78 Binary files /dev/null and b/files/assets/images/rDrama/badges/28.webp differ diff --git a/files/classes/badges.py b/files/classes/badges.py index 0012c704e..8f8efeac5 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -26,10 +26,10 @@ class BadgeDef(Base): @property @lazy def path(self): - if self.id == 7 or 20 < self.id < 28 or self.id == 222: - return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/badges/{self.id}.webp?x=2" + if self.id == 7 or 20 < self.id < 29 or self.id == 222: + return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/badges/{self.id}.webp?x=7" - return f"{SITE_FULL_IMAGES}/i/badges/{self.id}.webp?x=2" + return f"{SITE_FULL_IMAGES}/i/badges/{self.id}.webp?x=7" class Badge(Base): @@ -55,7 +55,7 @@ class Badge(Base): @property @lazy def until(self): - if self.badge_id == 28 and self.user.agendaposter != 1: return self.user.agendaposter + if self.badge_id == 58 and self.user.agendaposter != 1: return self.user.agendaposter if self.badge_id == 170 and self.user.marsify != 1: return self.user.marsify if self.badge_id == 94: return self.user.progressivestack diff --git a/files/classes/user.py b/files/classes/user.py index f0903c36e..64c4ccd8b 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -426,13 +426,13 @@ class User(Base): @property @lazy def discount(self): - if self.patron == 1: discount = 0.90 - elif self.patron == 2: discount = 0.85 - elif self.patron == 3: discount = 0.80 - elif self.patron == 4: discount = 0.75 - elif self.patron == 5: discount = 0.70 - elif self.patron == 6: discount = 0.65 - elif self.patron == 7: discount = 0.60 + if self.patron in {1,2}: discount = 0.90 + elif self.patron == 3: discount = 0.85 + elif self.patron == 4: discount = 0.80 + elif self.patron == 5: discount = 0.75 + elif self.patron == 6: discount = 0.70 + elif self.patron == 7: discount = 0.65 + elif self.patron == 8: discount = 0.60 else: discount = 1 owned_badges = [x.badge_id for x in self.badges] @@ -987,19 +987,19 @@ class User(Base): @property @lazy def patron_tooltip(self): - if self.patron == 1: - return 'Contributes $5/month' if self.patron == 2: - return 'Contributes $10/month' + return 'Contributes $5/month' if self.patron == 3: - return 'Contributes $20/month' + return 'Contributes $10/month' if self.patron == 4: - return 'Contributes $50/month' + return 'Contributes $20/month' if self.patron == 5: - return 'Contributes $100/month' + return 'Contributes $50/month' if self.patron == 6: - return 'Contributes $200/month' + return 'Contributes $100/month' if self.patron == 7: + return 'Contributes $200/month' + if self.patron == 8: return 'Contributes $500/month' return '' diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 15cbbd58e..9f66143a4 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -699,13 +699,13 @@ HOUSE_JOIN_COST = 500 HOUSE_SWITCH_COST = 2000 TIERS_ID_TO_NAME = { - 1: "Paypig", - 2: "Renthog", - 3: "Landchad", - 4: "Terminally online turboautist", - 5: "Marsey's Sugar Daddy", - 6: "JIDF Bankroller", - 7: "Rich Bich", + 2: "Paypig", + 3: "Renthog", + 4: "Landchad", + 5: "Terminally online turboautist", + 6: "Marsey's Sugar Daddy", + 7: "JIDF Bankroller", + 8: "Rich Bich", } BADGE_BLACKLIST = { # only grantable by admins higher than PERMS['IGNORE_BADGE_BLACKLIST'] @@ -896,13 +896,13 @@ elif SITE == 'watchpeopledie.tv': SIGNUP_FOLLOW_ID = CARP_ID TIERS_ID_TO_NAME = { - 1: "Victim", - 2: "Corpse", - 3: "Zombie", - 4: "Ghost", - 5: "Survivor", - 6: "Jigsaw", - 7: "P̵͇̕S̶̔̇Ȳ̴͙C̶͋͗H̵͒̉O̴̎̍ ", + 2: "Victim", + 3: "Corpse", + 4: "Zombie", + 5: "Ghost", + 6: "Survivor", + 7: "Jigsaw", + 8: "P̵͇̕S̶̔̇Ȳ̴͙C̶͋͗H̵͒̉O̴̎̍ ", } elif SITE == 'devrama.net': AEVANN_ID = 7 @@ -1032,23 +1032,6 @@ def is_safe_url(url): hosts = "|".join(approved_embed_hosts).replace('.','\.') -tiers={ - "(Paypig)": 1, - "(Renthog)": 2, - "(Landchad)": 3, - "(Terminally online turboautist)": 4, - "(Marsey's Sugar Daddy)": 5, - "(JIDF Bankroller)": 6, - "(Rich Bich)": 7, - "(LlamaBean)": 1, - "(Victim)": 1, - "(Corpse)": 2, - "(Zombie)": 3, - "(Ghost)": 4, - "(Survivor)": 5, - "(Jigsaw)": 6, - } - has_sidebar = path.exists(f'files/templates/sidebar_{SITE_NAME}.html') has_logo = path.exists(f'files/assets/images/{SITE_NAME}/logo.webp') diff --git a/files/routes/admin.py b/files/routes/admin.py index 060f457fa..e9d756808 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1099,7 +1099,7 @@ def agendaposter(id, v): ) g.db.add(ma) - badge_grant(user=user, badge_id=28) + badge_grant(user=user, badge_id=58) if 'reason' in request.values: if request.values["reason"].startswith("/post/"): diff --git a/files/routes/awards.py b/files/routes/awards.py index 2f1b2c1e0..daf996e0e 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -335,7 +335,7 @@ def award_thing(v, thing_type, id): author.agendaposter_phrase = note.lower() - badge_grant(user=author, badge_id=28) + badge_grant(user=author, badge_id=58) elif kind == "flairlock": new_name = note[:100].replace("𒐪","").replace("﷽","").strip() if not new_name and author.flairchanged: diff --git a/files/routes/users.py b/files/routes/users.py index fb566197b..a0fb96750 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -1322,18 +1322,18 @@ def bid_list(v:User, bid): tiers={ - 3: 1, - 5: 1, - 10: 2, - 20: 3, - 50: 4, - 100: 5, - 151: 5, - 200: 6, - 500: 7, + 3: 2, + 5: 2, + 10: 3, + 20: 4, + 50: 5, + 100: 6, + 151: 6, + 200: 7, + 500: 8, } -marseybux_li = (0,2500,5000,10000,25000,50000,100000,250000) +marseybux_li = (0,0,2500,5000,10000,25000,50000,100000,250000) def claim_rewards(v): transactions = g.db.query(Transaction).filter_by(email=v.email, claimed=None).all() diff --git a/files/templates/admin/patrons.html b/files/templates/admin/patrons.html index d4bda2aa3..46f40ec80 100644 --- a/files/templates/admin/patrons.html +++ b/files/templates/admin/patrons.html @@ -15,7 +15,9 @@ {{loop.index}} {% include "user_in_table.html" %} - 2{{user.patron}} + {% if user.patron > 1 %} + 2{{user.patron}} + {% endif %} {{user.truescore}} diff --git a/files/templates/comments.html b/files/templates/comments.html index e65da1ec2..84d470ca6 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -158,8 +158,8 @@ {% if c.ghost %} 👻 {% else %} - {% if FEATURES['PATRON_ICONS'] and c.author.patron %} - {{c.author.patron_tooltip}} + {% if FEATURES['PATRON_ICONS'] and c.author.patron > 1 %} + {{c.author.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and c.author.house %} diff --git a/files/templates/userpage/banner.html b/files/templates/userpage/banner.html index 83d5808ec..09827e1c9 100644 --- a/files/templates/userpage/banner.html +++ b/files/templates/userpage/banner.html @@ -31,8 +31,8 @@ {% endif %} - {% if FEATURES['PATRON_ICONS'] and u.patron %} - {{u.patron_tooltip}} + {% if FEATURES['PATRON_ICONS'] and u.patron > 1 %} + {{u.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and u.house %} @@ -293,8 +293,8 @@ {% endif %} - {% if FEATURES['PATRON_ICONS'] and u.patron %} - {{u.patron_tooltip}} + {% if FEATURES['PATRON_ICONS'] and u.patron > 1 %} + {{u.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and u.house %} diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index ac0affb34..35f908eee 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -59,8 +59,8 @@ {% if p.ghost %} 👻 {% else %} - {% if FEATURES['PATRON_ICONS'] and p.author.patron %} - {{p.author.patron_tooltip}} + {% if FEATURES['PATRON_ICONS'] and p.author.patron > 1 %} + {{p.author.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and p.author.house %} diff --git a/migrations/20230503-add-new-patron-tier-for-benefactorcels.sql b/migrations/20230503-add-new-patron-tier-for-benefactorcels.sql new file mode 100644 index 000000000..35f6ed7ba --- /dev/null +++ b/migrations/20230503-add-new-patron-tier-for-benefactorcels.sql @@ -0,0 +1,15 @@ +update badge_defs set name='Paypig', description='Contributes $5/month' where id=22; +update badge_defs set name='Renthog', description='Contributes $10/month' where id=23; +update badge_defs set name='Landchad', description='Contributes $20/month' where id=24; +update badge_defs set name='Terminally online turboautist', description='Contributes $50/month' where id=25; +update badge_defs set name='Marsey''s Sugar Daddy', description='Contributes $100/month' where id=26; +update badge_defs set name='JIDF Bankroller', description='Contributes $200/month' where id=27; +update badge_defs set name='Rich Bich', description='Contributes $500/month' where id=28; + +INSERT INTO public.badge_defs VALUES (58, 'Chud', 'Marked as a chud', NULL); +update badges set badge_id=58 where badge_id=28; + +update badges set badge_id=badge_id+1 where badge_id in (21,22,23,24,25,26,27); +delete from badge_defs where id=21; + +update users set patron=patron+1 where id in (select user_id from badges where badge_id in (22,23,24,25,26,27,28));