add new patron tier for benefactor-cels
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 694 KiB After Width: | Height: | Size: 694 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 24 KiB |
|
@ -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
|
||||
|
|
|
@ -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 ''
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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/"):
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
<td>{{loop.index}}</td>
|
||||
<td>{% include "user_in_table.html" %}</td>
|
||||
<td>
|
||||
<img class="contain" alt="2{{user.patron}}" loading="lazy" width=29.33 height=32 src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{user.patron}}.webp?x=6">
|
||||
{% if user.patron > 1 %}
|
||||
<img class="contain" alt="2{{user.patron}}" loading="lazy" width=29.33 height=32 src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{user.patron}}.webp?x=7">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{user.truescore}}</td>
|
||||
</tr>
|
||||
|
|
|
@ -158,8 +158,8 @@
|
|||
{% if c.ghost %}
|
||||
<span {% if c.distinguish_level %}class="mod {% if SITE_NAME == 'rDrama' %}mod-rdrama{% endif %}"{% endif %}>👻</span>
|
||||
{% else %}
|
||||
{% if FEATURES['PATRON_ICONS'] and c.author.patron %}
|
||||
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{c.author.patron}}.webp?x=6" class="patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{c.author.patron_tooltip}}" alt="{{c.author.patron_tooltip}}">
|
||||
{% if FEATURES['PATRON_ICONS'] and c.author.patron > 1 %}
|
||||
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{c.author.patron}}.webp?x=7" class="patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{c.author.patron_tooltip}}" alt="{{c.author.patron_tooltip}}">
|
||||
{% endif %}
|
||||
|
||||
{% if FEATURES['HOUSES'] and c.author.house %}
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if FEATURES['PATRON_ICONS'] and u.patron %}
|
||||
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{u.patron}}.webp?x=6" class="ml-3 patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.patron_tooltip}}" alt="{{u.patron_tooltip}}">
|
||||
{% if FEATURES['PATRON_ICONS'] and u.patron > 1 %}
|
||||
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{u.patron}}.webp?x=7" class="ml-3 patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.patron_tooltip}}" alt="{{u.patron_tooltip}}">
|
||||
{% endif %}
|
||||
|
||||
{% if FEATURES['HOUSES'] and u.house %}
|
||||
|
@ -293,8 +293,8 @@
|
|||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if FEATURES['PATRON_ICONS'] and u.patron %}
|
||||
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{u.patron}}.webp?x=6" class="ml-2 patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.patron_tooltip}}" alt="{{u.patron_tooltip}}">
|
||||
{% if FEATURES['PATRON_ICONS'] and u.patron > 1 %}
|
||||
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{u.patron}}.webp?x=7" class="ml-2 patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.patron_tooltip}}" alt="{{u.patron_tooltip}}">
|
||||
{% endif %}
|
||||
|
||||
{% if FEATURES['HOUSES'] and u.house %}
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
{% if p.ghost %}
|
||||
<span {% if p.distinguish_level %}class="mod {% if SITE_NAME == 'rDrama' %}mod-rdrama{% endif %}"{% endif %}>👻</span>
|
||||
{% else %}
|
||||
{% if FEATURES['PATRON_ICONS'] and p.author.patron %}
|
||||
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{p.author.patron}}.webp?x=6" class="patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.patron_tooltip}}" alt="{{p.author.patron_tooltip}}">
|
||||
{% if FEATURES['PATRON_ICONS'] and p.author.patron > 1 %}
|
||||
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/{{SITE_NAME}}/badges/2{{p.author.patron}}.webp?x=7" class="patron-img" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.patron_tooltip}}" alt="{{p.author.patron_tooltip}}">
|
||||
{% endif %}
|
||||
|
||||
{% if FEATURES['HOUSES'] and p.author.house %}
|
||||
|
|
|
@ -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));
|