add forced hats

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-19 20:52:50 +02:00
parent 71ee00e2aa
commit 45ba326222
2 changed files with 32 additions and 1 deletions

View File

@ -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)

View File

@ -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'
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!")
}