forked from rDrama/rDrama
add janny award discount of 2% per level, cap disccount at 45%, decrease benefactor given marseybux to 2000
parent
4d1efffee6
commit
85cf331ae1
|
@ -503,12 +503,14 @@ class User(Base):
|
|||
elif self.patron == 8: after_discount = 0.60
|
||||
else: after_discount = 1
|
||||
|
||||
after_discount -= 0.02 * self.admin_level
|
||||
|
||||
owned_badges = [x.badge_id for x in self.badges]
|
||||
|
||||
for badge in discounts:
|
||||
if badge in owned_badges: after_discount -= discounts[badge]
|
||||
|
||||
return after_discount
|
||||
return max(after_discount, 0.55)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
|
@ -700,7 +700,7 @@ AWARDS = {
|
|||
"benefactor": {
|
||||
"kind": "benefactor",
|
||||
"title": "Benefactor",
|
||||
"description": f"Grants one month of {patron} status and 2500 marseybux to the recipient. Cannot be used on yourself.",
|
||||
"description": f"Grants one month of {patron} status and 2000 marseybux to the recipient. Cannot be used on yourself.",
|
||||
"icon": "fas fa-gift",
|
||||
"color": "text-blue",
|
||||
"price": 4000,
|
||||
|
|
|
@ -461,7 +461,7 @@ def award_thing(v, thing_type, id):
|
|||
author.patron = 1
|
||||
if author.patron_utc: author.patron_utc += 2629746
|
||||
else: author.patron_utc = int(time.time()) + 2629746
|
||||
author.pay_account('marseybux', 2500)
|
||||
author.pay_account('marseybux', 2000)
|
||||
badge_grant(user=v, badge_id=103)
|
||||
elif kind == "rehab":
|
||||
if author.rehab: author.rehab += 86400
|
||||
|
|
Loading…
Reference in New Issue