From 2201745c93d10c37a0edd2c185b0d6c35355699e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 2 Sep 2022 20:10:35 +0200 Subject: [PATCH] add owoify and marsify to offsites --- files/helpers/awards.py | 2 +- files/helpers/const.py | 23 ++++++++++++++++++++++- files/routes/awards.py | 4 ++-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/files/helpers/awards.py b/files/helpers/awards.py index 0c7d6f4fd..e07f8a1d3 100644 --- a/files/helpers/awards.py +++ b/files/helpers/awards.py @@ -88,7 +88,7 @@ def award_timers(v, bot=False): dirty = True if v.marsify and v.marsify < now: v.marsify = None - # notify_if_not_bot("Your marsify status has expired!") + if SITE_NAME != 'rDrama': notify_if_not_bot("Your marsify status has expired!") dirty = True if dirty: diff --git a/files/helpers/const.py b/files/helpers/const.py index 0f54a44b4..90a60e27a 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -716,6 +716,27 @@ AWARDS = { }, } +if SITE_NAME != 'rDrama': + EXTRA_AWARDS = { + "owoify": { + "kind": "owoify", + "title": "OwOify", + "description": "OwOifies the recipient's comments for 6 hours.", + "icon": "fas fa-paw-simple", + "color": "text-purple", + "price": 400 + }, + "marsify": { + "kind": "marsify", + "title": "Marsify", + "description": "Marsifies the recipient's comments for 6 hours.", + "icon": "fas fa-cat", + "color": "text-white", + "price": 400 + }, + } + AWARDS.update(EXTRA_AWARDS) + if SITE_NAME == 'PCM': PCM_AWARDS = { "croag": { @@ -743,7 +764,7 @@ if SITE_NAME == 'PCM': "price": 4000 } } - AWARDS = {**PCM_AWARDS, **AWARDS} + AWARDS.update(PCM_AWARDS) # Disable unused awards, and site-specific award inclusion/exclusion. AWARDS_DISABLED = [ diff --git a/files/routes/awards.py b/files/routes/awards.py index 6609e0f81..fde9b8d36 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -349,7 +349,7 @@ def award_thing(v, thing_type, id): elif "Racist" in kind and kind == v.house: if author.earlylife: author.earlylife += 86400 else: author.earlylife = int(time.time()) + 86400 - elif "Furry" in kind and kind == v.house: + elif ("Furry" in kind and kind == v.house) or kind == 'owoify': if author.owoify: author.owoify += 21600 else: author.owoify = int(time.time()) + 21600 @@ -359,7 +359,7 @@ def award_thing(v, thing_type, id): if author.marsify: body = marsify(body) thing.body_html = sanitize(body, limit_pings=5) g.db.add(thing) - elif "Femboy" in kind and kind == v.house: + elif ("Femboy" in kind and kind == v.house) or kind == 'marsify': if author.marsify: author.marsify += 21600 else: author.marsify = int(time.time()) + 21600