From 0bcebc170000c23df0864ebdccb3948b3247a5b6 Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 26 Nov 2022 20:14:31 +0000 Subject: [PATCH] Update chud award to include forced trans/pride flag hats (#10) Disclaimer: I made these changes in Notepad and didn't bother to test this change locally. Co-authored-by: Marco Reviewed-on: https://fsdfsd.net/rDrama/rDrama/pulls/10 Co-authored-by: Marco Co-committed-by: Marco --- files/classes/user.py | 5 ++++- files/helpers/const.py | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 5f5880771..46cae62b6 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -248,7 +248,10 @@ class User(Base): if self.marsify > 1: user_forced_hats.append(val) elif getattr(self, k): - user_forced_hats.append(val) + if k == 'agendaposter': + user_forced_hats.append(random.choice(val)) + else: + user_forced_hats.append(val) if user_forced_hats: return random.choice(user_forced_hats) else: return None diff --git a/files/helpers/const.py b/files/helpers/const.py index ad11b2de3..12755d760 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -1612,7 +1612,12 @@ forced_hats = { "earlylife": ("The Merchant", "SHUT IT DOWN, the goys know!"), "marsify": ("Marsified", "I can't pick my own Marseys, help!"), "is_suspended": ("Behind Bars", "This user is banned and needs to do better!"), - "agendaposter": ("Egg_irl", "This user is getting in touch with xir identity!") + "agendaposter": (("Egg_irl", "This user is getting in touch with xir identity!"), + ("Trans Flag", "Just in case you forgot, trans lives matter."), + ("Trans Flag II", "Your egg is cracked; wear it with pride!"), + ("Pride Flag", "Never forget that this is a primarily gay community. Dude bussy lmao."), + ("Pride Flag II", "This user is a proud supporter of LGBTQ+ rights.")) + } EMAIL_REGEX_PATTERN = '[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{2,63}\.[A-Za-z]{2,63}'