diff --git a/files/assets/images/rDrama/houses/Edgy Founder.webp b/files/assets/images/rDrama/houses/Edgy Founder.webp new file mode 100644 index 0000000000..cb5e0048fd Binary files /dev/null and b/files/assets/images/rDrama/houses/Edgy Founder.webp differ diff --git a/files/assets/images/rDrama/houses/Edgy.webp b/files/assets/images/rDrama/houses/Edgy.webp new file mode 100644 index 0000000000..4f38dd2614 Binary files /dev/null and b/files/assets/images/rDrama/houses/Edgy.webp differ diff --git a/files/classes/comment.py b/files/classes/comment.py index 367d5216c1..49371871a0 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -77,7 +77,7 @@ def add_options(self, body, v): else: sub = None - if sub in {'furry','vampire','racist','femboy'} and not v.house.lower().startswith(sub): + if sub in {'furry','vampire','racist','femboy','edgy'} and not v.house.lower().startswith(sub): option_body += ' disabled ' option_body += f''' data-nonce="{g.nonce}" data-onclick="poll_vote_{o.exclusive}('{o.id}', '{self.id}', '{kind}')"''' diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 9e663204e1..269366c10a 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -58,9 +58,7 @@ def execute_snappy(post:Post, v:User): snappy = get_account(SNAPPY_ID) - if post.sub == 'edgy': - body = SNAPPY_EDGY - elif v.id == CARP_ID: + if v.id == CARP_ID: if random.random() < 0.02: body = "i love you carp" elif random.random() < 0.02: diff --git a/files/helpers/config/awards.py b/files/helpers/config/awards.py index 72a6523b96..51baf98273 100644 --- a/files/helpers/config/awards.py +++ b/files/helpers/config/awards.py @@ -494,6 +494,19 @@ AWARDS = { "ghost": False, "enabled": SITE_NAME != 'rDrama', }, + "sharpen": { + "kind": "sharpen", + "title": "Sharpen", + "description": "Adds a badass edge to all the user's comments for 24 hours.", + "icon": "fas fa-fire", + "color": "text-danger", + "price": 500, + "deflectable": True, + "cosmetic": False, + "ghost": False, + "enabled": SITE_NAME != 'rDrama', + }, + "rehab": { "kind": "rehab", "title": "Rehab", @@ -506,18 +519,6 @@ AWARDS = { "ghost": False, "enabled": True, }, - "sharpen": { - "kind": "sharpen", - "title": "Sharpen", - "description": "Adds a badass edge to all user's comments", - "icon": "fas fa-fire", - "color": "text-danger", - "price": 500, - "deflectable": True, - "cosmetic": False, - "ghost": False, - "enabled": True, - }, "flairlock": { "kind": "flairlock", "title": "1-Day Flairlock", @@ -849,6 +850,17 @@ HOUSE_AWARDS = { "cosmetic": False, "ghost": False, }, + "Edgy": { + "kind": "Edgy", + "title": "Sharpen", + "description": "Adds a badass edge to all the user's comments for 24 hours.", + "icon": "fas fa-fire", + "color": "text-danger", + "price": 500, + "deflectable": True, + "cosmetic": False, + "ghost": False, + }, } temp = deepcopy(HOUSE_AWARDS).items() diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index ac6d60eb5c..cd7eb70b4f 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -979,7 +979,7 @@ else: # localhost or testing environment implied FEATURES['USERS_PERMANENT_WORD_FILTERS'] = True SUB_BANNER_LIMIT = 69420 -HOUSES = ("None","Furry","Femboy","Vampire","Racist") if FEATURES['HOUSES'] else ("None") +HOUSES = ("None","Furry","Femboy","Vampire","Racist","Edgy") if FEATURES['HOUSES'] else ("None") BOT_IDs = {AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID} @@ -1182,20 +1182,6 @@ def IS_EVENT(): return "birthdead" return None -SNAPPY_EDGY = """You will never be a real house. You have no award, you have no members, you have no symbol. You are a chuddite losers twisted by downmarseys and soren into a crude mockery of Carp's perfection. - -All the “validation” you get is two-faced and half-hearted. Behind your back people mock you. Your jannies are disgusted and ashamed of you, your “friends” laugh at your foolish appearance on groomercord. - -Dramatards are utterly repulsed by you. Thousands of years of evolution have allowed lurkers to sniff out fanfiction with incredible efficiency. Even your founders look uncanny and unnatural to a lurker. Your house structure is a dead giveaway. And even if you manage to get a member to join, he'll turn tail and bolt the second he gets enough marseycoin for a real house. - -You will never be happy. You wrench out a fake smile every single morning and tell yourself it's going to be ok, but deep inside you feel the depression creeping up like a weed, ready to crush you under the unbearable weight. - -Eventually it'll be too much to bear - you'll buy a rope, tie a noose, put it around your neck, and plunge into the cold abyss. Jannies will find you, heartbroken but relieved that they no longer have to live with the unbearable shame and disappointment. They'll bury you with a headstone marked with your real house, and every passerby for the rest of eternity will know a racist or vampire is buried there. Your body will decay and go back to the dust, and all that will remain of your legacy is a skeleton that is unmistakably soy. - -This is your fate. This is what you chose. There is no turning back. - -""" - CHUD_PHRASES = ( "Trans lives matter", "Black lives matter", diff --git a/files/helpers/stats.py b/files/helpers/stats.py index 6a7d430d79..09158e21da 100644 --- a/files/helpers/stats.py +++ b/files/helpers/stats.py @@ -128,14 +128,16 @@ def stats(): if SITE_NAME == 'rDrama' or FEATURES['HOUSES']: stats2 = { - "House furry members": "{:,}".format(g.db.query(User).filter(User.house.like('Furry%')).count()), - "House femboy members": "{:,}".format(g.db.query(User).filter(User.house.like('Femboy%')).count()), - "House vampire members": "{:,}".format(g.db.query(User).filter(User.house.like('Vampire%')).count()), - "House racist members": "{:,}".format(g.db.query(User).filter(User.house.like('Racist%')).count()), - "House furry total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Furry%')).scalar() or 0), - "House femboy total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Femboy%')).scalar() or 0), - "House vampire total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Vampire%')).scalar() or 0), - "House racist total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Racist%')).scalar() or 0), + "House Furry members": "{:,}".format(g.db.query(User).filter(User.house.like('Furry%')).count()), + "House Femboy members": "{:,}".format(g.db.query(User).filter(User.house.like('Femboy%')).count()), + "House Vampire members": "{:,}".format(g.db.query(User).filter(User.house.like('Vampire%')).count()), + "House Racist members": "{:,}".format(g.db.query(User).filter(User.house.like('Racist%')).count()), + "House Edgy members": "{:,}".format(g.db.query(User).filter(User.house.like('Edgy%')).count()), + "House Furry total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Furry%')).scalar() or 0), + "House Femboy total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Femboy%')).scalar() or 0), + "House Vampire total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Vampire%')).scalar() or 0), + "House Racist total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Racist%')).scalar() or 0), + "House Edgy total truescore": "{:,}".format(g.db.query(func.sum(User.truescore)).filter(User.house.like('Edgy%')).scalar() or 0), } stats.update(stats2) diff --git a/files/routes/awards.py b/files/routes/awards.py index 75bad66e57..b807641632 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -548,14 +548,14 @@ def award_thing(v, thing_type, id): if author.marsify: body = marsify(body) thing.body_html = sanitize(body, limit_pings=5, showmore=True) g.db.add(thing) - elif kind == 'sharpen': + elif ("Edgy" in kind and kind == v.house) or kind == 'sharpen': if author.chud: abort(409, f"{safe_username} is under the effect of a conflicting award: Chud award!") if author.queen: abort(409, f"{safe_username} is under the effect of a conflicting award: Queen award!") - if author.sharpen: author.sharpen += 21600 - else: author.sharpen = int(time.time()) + 21600 + if author.sharpen: author.sharpen += 86400 + else: author.sharpen = int(time.time()) + 86400 badge_grant(user=author, badge_id=289) if thing_type == 'comment' and not thing.author.deflector: diff --git a/files/routes/comments.py b/files/routes/comments.py index 96f531c7c6..32e37a450c 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -150,7 +150,7 @@ def comment(v:User): if posting_to_post: sub = post_target.sub if sub and v.exiled_from(sub): abort(403, f"You're exiled from /h/{sub}") - if sub in {'furry','vampire','racist','femboy'} and not v.client and not v.house.lower().startswith(sub): + if sub in {'furry','vampire','racist','femboy','edgy'} and not v.client and not v.house.lower().startswith(sub): abort(403, f"You need to be a member of House {sub.capitalize()} to comment in /h/{sub}") if level > COMMENT_MAX_DEPTH: abort(400, f"Max comment level is {COMMENT_MAX_DEPTH}") diff --git a/files/routes/polls.py b/files/routes/polls.py index f6ba22eecc..8bd6ca76dc 100644 --- a/files/routes/polls.py +++ b/files/routes/polls.py @@ -20,7 +20,7 @@ def vote_option(option_id, v): if not option: abort(404) sub = option.parent.sub - if sub in {'furry','vampire','racist','femboy'} and not v.house.lower().startswith(sub): + if sub in {'furry','vampire','racist','femboy','edgy'} and not v.house.lower().startswith(sub): abort(403, f"You need to be a member of House {sub.capitalize()} to vote on polls in /h/{sub}") if option.exclusive == 2: @@ -75,7 +75,7 @@ def vote_option_comment(option_id, v): else: sub = None - if sub in {'furry','vampire','racist','femboy'} and not v.house.lower().startswith(sub): + if sub in {'furry','vampire','racist','femboy','edgy'} and not v.house.lower().startswith(sub): abort(403, f"You need to be a member of House {sub.capitalize()} to vote on polls in /h/{sub}") if option.exclusive == 2: diff --git a/files/routes/posts.py b/files/routes/posts.py index e4f678c2cb..158eb99342 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -470,7 +470,7 @@ def submit_post(v:User, sub=None): if sub == 'changelog': abort(400, "/h/changelog is archived") - if sub in {'furry','vampire','racist','femboy'} and not v.client and not v.house.lower().startswith(sub): + if sub in {'furry','vampire','racist','femboy','edgy'} and not v.client and not v.house.lower().startswith(sub): abort(400, f"You need to be a member of House {sub.capitalize()} to post in /h/{sub}") if sub and sub != 'none': diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 3d5dd61ab3..141d588b00 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -183,7 +183,7 @@ def move_post(post:Post, v:User, reason:str) -> Union[bool, str]: if sub_to == 'changelog': abort(403, "/h/changelog is archived!") - if sub_to in {'furry','vampire','racist','femboy'} and not v.client and not post.author.house.lower().startswith(sub_to): + if sub_to in {'furry','vampire','racist','femboy','edgy'} and not v.client and not post.author.house.lower().startswith(sub_to): if v.id == post.author_id: abort(403, f"You need to be a member of House {sub_to.capitalize()} to post in /h/{sub_to}") else: diff --git a/files/routes/subs.py b/files/routes/subs.py index a0d99896e8..f30c436e01 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -283,7 +283,7 @@ def add_mod(v:User, sub): user = get_user(user, v=v) - if sub in {'furry','vampire','racist','femboy'} and not v.client and not user.house.lower().startswith(sub): + if sub in {'furry','vampire','racist','femboy','edgy'} and not v.client and not user.house.lower().startswith(sub): abort(403, f"@{user.username} needs to be a member of House {sub.capitalize()} to be added as a mod there!") existing = g.db.query(Mod).filter_by(user_id=user.id, sub=sub).one_or_none()