diff --git a/files/classes/user.py b/files/classes/user.py index 406780131..a7592b7b9 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -231,6 +231,16 @@ class User(Base): return random.choice(self.equipped_hats) return None + @property + @lazy + def forced_hat(self): + user_forced_hats = [] + for k, val in forced_hats.items(): + if getattr(self, k): + user_forced_hats.append(val) + if user_forced_hats: return random.choice(user_forced_hats) + else: return None + @property @lazy def hat_active(self): @@ -240,6 +250,9 @@ class User(Base): if self.is_cakeday: return '/i/hats/Cakeday.webp' + if self.forced_hat: + return f'/i/hats/{self.forced_hat[0]}.webp' + if self.equipped_hat: return f'/i/hats/{self.equipped_hat.name}.webp' @@ -253,6 +266,9 @@ class User(Base): if self.is_cakeday: return "I've spent another year rotting my brain with dramaposting, please ridicule me 🤓" + if self.forced_hat: + return self.forced_hat[1] + if self.equipped_hat: return self.equipped_hat.name + ' - ' + self.equipped_hat.censored_description(v) diff --git a/files/helpers/const.py b/files/helpers/const.py index 4dafc7b7f..57aa6144d 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -1067,4 +1067,19 @@ has_app = path.exists(f'files/assets/app_{SITE_NAME}_v2.4.apk') GLOBAL = environ.get("GLOBAL") -ONLINE_STR = f'{SITE}_online' \ No newline at end of file +ONLINE_STR = f'{SITE}_online' + +forced_hats = { + "rehab": ("Roulette", "I'm a recovering ludomaniac!"), + "progressivestack": ("Attention Whore", "I won the oppression olympics!"), + "longpost": ("The Pizzashill", "We need to get rid of the character limit!"), + "bird": ("Bluecheck", "Three sentences is too much for me..."), + "marseyawarded": ("Three Lil Marseys", ":marseynotes: :marseynotes: :I prefer to speak in cats:"), + "bite": ("Vampire Mask", "When other little girls wanted to be ballet dancers I kind of wanted to be a vampire."), + "rainbow": ("Globohomo", "Homosexuality is no longer optional!"), + "owoify": ("Furry Marsey", "Nuzzles, pounces on you, UwU, you're so warm!.."), + "earlylife": ("The Merchant", "SHUT IT DOWN, the goys know!"), + "marsify": ("Marsified", "I can't pick my own Marseys, help!"), + "is_banned": ("Behind Bars", "This user is banned and needs to do better!"), + "agendaposter": ("Egg_irl", "This user is getting in touch with xir identity!") +} \ No newline at end of file