diff --git a/files/assets/images/emojis/chadnocapy.webp b/files/assets/images/emojis/chadnocapy.webp new file mode 100644 index 000000000..708b389c4 Binary files /dev/null and b/files/assets/images/emojis/chadnocapy.webp differ diff --git a/files/assets/images/emojis/chadwomanasian.webp b/files/assets/images/emojis/chadwomanasian.webp new file mode 100644 index 000000000..53e874e73 Binary files /dev/null and b/files/assets/images/emojis/chadwomanasian.webp differ diff --git a/files/assets/images/emojis/chadwomanblack.webp b/files/assets/images/emojis/chadwomanblack.webp new file mode 100644 index 000000000..9c1111dc4 Binary files /dev/null and b/files/assets/images/emojis/chadwomanblack.webp differ diff --git a/files/assets/images/emojis/chadwomanlatinx.webp b/files/assets/images/emojis/chadwomanlatinx.webp new file mode 100644 index 000000000..076ede307 Binary files /dev/null and b/files/assets/images/emojis/chadwomanlatinx.webp differ diff --git a/files/assets/images/emojis/chadwomannordic.webp b/files/assets/images/emojis/chadwomannordic.webp new file mode 100644 index 000000000..d2b5b9b45 Binary files /dev/null and b/files/assets/images/emojis/chadwomannordic.webp differ diff --git a/files/assets/images/emojis/ethottalking.webp b/files/assets/images/emojis/ethottalking.webp new file mode 100644 index 000000000..a494e37da Binary files /dev/null and b/files/assets/images/emojis/ethottalking.webp differ diff --git a/files/assets/images/emojis/holdupjak.webp b/files/assets/images/emojis/holdupjak.webp new file mode 100644 index 000000000..23ea68919 Binary files /dev/null and b/files/assets/images/emojis/holdupjak.webp differ diff --git a/files/assets/images/emojis/naziseethe.webp b/files/assets/images/emojis/naziseethe.webp new file mode 100644 index 000000000..2d0b257f0 Binary files /dev/null and b/files/assets/images/emojis/naziseethe.webp differ diff --git a/files/assets/images/emojis/purerage.webp b/files/assets/images/emojis/purerage.webp new file mode 100644 index 000000000..9a3cd5819 Binary files /dev/null and b/files/assets/images/emojis/purerage.webp differ diff --git a/files/assets/images/emojis/wolfdramanomicon.webp b/files/assets/images/emojis/wolfdramanomicon.webp new file mode 100644 index 000000000..6d4f3843e Binary files /dev/null and b/files/assets/images/emojis/wolfdramanomicon.webp differ diff --git a/files/assets/images/emojis/wombiezolf.webp b/files/assets/images/emojis/wombiezolf.webp new file mode 100644 index 000000000..f2c153c68 Binary files /dev/null and b/files/assets/images/emojis/wombiezolf.webp differ diff --git a/files/assets/js/emoji_modal.js b/files/assets/js/emoji_modal.js index ef0ee9990..79b15c069 100644 --- a/files/assets/js/emoji_modal.js +++ b/files/assets/js/emoji_modal.js @@ -25,13 +25,13 @@ function loadEmojis(form) { 'rage': ['trolldespair','clueless','troll','bitchplease','spit','challengeaccepted','contentiouscereal','cryingatcuteness','derp','derpcornsyrup','derpcrying','derpcute','derpdumb','derpeuphoria','derpinahd','derpinapokerface','derpinasnickering','derpprocessing','derprealization','derpsnickering','derptalking','derpthinking','derpthumbsup','derpunimpressed','derpwhy','donotwant','epicfacefeatures','fancywithwine','fffffffuuuuuuuuuuuu','flipthetable','foreveralone','foreveralonehappy','hewillnever','idontknow','interuptedreading','iseewhatyoudidthere','killherkillher','ledesire','leexcited','legenius','lelolidk','lemiddlefinger','lemindblown','leokay','lepanicrunning','lepokerface','lepokerface2','lerageface','leseriousface','likeaboss','lolface','longwhiskers','manymiddlefingers','megusta','motherfucker','motherofgod','mysides','ohgodwhy','pervertedspiderman','picard','ragestrangle','rukiddingme','tfwyougettrolled','trollolol','truestorybro','xallthey','yuno'], - 'wojak': ['trumpjaktalking','rdramajanny','soyreddit','doomerboy','npcsupport','npcoppse','grugthink','soyconsoomer','soyjaktalking','soyquack','tradboy','sciencejak','soyjakanimeglasses','soymad','boomerportrait','soycry','punchjak','seethejak','chadyes','chadno','abusivewife','ancap','bardfinn','bloomer','boomer','boomermonster','brainletbush','brainletcaved','brainletchair','brainletchest','brainletmaga','brainletpit','chad','chadarab','chadasian','chadblack','chadjesus','chadjew','chadjihadi','chadlatino','chadlibleft','chadnordic','chadsikh','chadusa','coomer','doomer','doomerfront','doomergirl','ethot','fatbrain','fatpriest','femboy','gogetter','grug','monke','nazijak','npc','npcfront','npcmaga','psychojak','ragejak','ragemask','ramonajak','soyjackwow','soyjak','soyjakfront','soyjakhipster','soyjakmaga','soyjakyell','tomboy','zoomer','zoomersoy'], + 'wojak': ['purerage','naziseethe','holdupjak','ethottalking','chadwomanasian','chadwomanblack','chadwomanlatinx','chadwomannordic','trumpjaktalking','rdramajanny','soyreddit','doomerboy','npcsupport','npcoppse','grugthink','soyconsoomer','soyjaktalking','soyquack','tradboy','sciencejak','soyjakanimeglasses','soymad','boomerportrait','soycry','punchjak','seethejak','chadyes','chadno','abusivewife','ancap','bardfinn','bloomer','boomer','boomermonster','brainletbush','brainletcaved','brainletchair','brainletchest','brainletmaga','brainletpit','chad','chadarab','chadasian','chadblack','chadjesus','chadjew','chadjihadi','chadlatino','chadlibleft','chadnordic','chadsikh','chadusa','coomer','doomer','doomerfront','doomergirl','ethot','fatbrain','fatpriest','femboy','gogetter','grug','monke','nazijak','npc','npcfront','npcmaga','psychojak','ragejak','ragemask','ramonajak','soyjackwow','soyjak','soyjakfront','soyjakhipster','soyjakmaga','soyjakyell','tomboy','zoomer','zoomersoy'], 'flags': ['russia','niger','lgbt','animesexual','blacknation','blm','blueline','dreamgender','fatpride','incelpride','israel','kazakhstan','landlordlove','scalperpride','superstraight','trans','translord','transracial','usa'], - 'wolf': ['wolfamogus','wolfmarine','wolfromulusremus','wolfrope','wolftinfoil','wolfmarseymask','wolfputin','wolfdrama','wolfcumjar','wolflgbt','wolfmarseyhead','wolfnoir','wolfsherifssmoking','wolftrans','wolfvaporwave','wolfangry','wolfbrains','wolfcry','wolfdead','wolfdevilish','wolffacepalm','wolfhappy','wolfidea','wolfkoala','wolflaugh','wolflove','wolfmeditate','wolfphone','wolfrainbow','wolfroses','wolfsad','wolfsfear','wolfsleep','wolftear','wolfthink','wolfthumbsup','wolfupsidedown','wolfvictory','wolfwave','wolfwink'], + 'wolf': ['wombiezolf','wolfdramanomicon','wolfamogus','wolfmarine','wolfromulusremus','wolfrope','wolftinfoil','wolfmarseymask','wolfputin','wolfdrama','wolfcumjar','wolflgbt','wolfmarseyhead','wolfnoir','wolfsherifssmoking','wolftrans','wolfvaporwave','wolfangry','wolfbrains','wolfcry','wolfdead','wolfdevilish','wolffacepalm','wolfhappy','wolfidea','wolfkoala','wolflaugh','wolflove','wolfmeditate','wolfphone','wolfrainbow','wolfroses','wolfsad','wolfsfear','wolfsleep','wolftear','wolfthink','wolfthumbsup','wolfupsidedown','wolfvictory','wolfwave','wolfwink'], - 'misc': ['xdoubt','gigachadjesus','yotsubafish','yotsubalol','sigmatalking','zoroarkconfused','zoroarkhappy','zoroarkpout','zoroarksleepy','casanovanova','deuxwaifu','flairlessmong','hardislife','redditgigachad','rfybear','etika','sneed','retardedchildren','bruh','autism','doot','kylieface','queenyes','wholesomeseal','chadyescapy','gigachadglow','gigachadorthodox','gigachad','gigachad2','gigachad3'] + 'misc': ['chadyescapy','chadnocapy','xdoubt','gigachadjesus','yotsubafish','yotsubalol','sigmatalking','zoroarkconfused','zoroarkhappy','zoroarkpout','zoroarksleepy','casanovanova','deuxwaifu','flairlessmong','hardislife','redditgigachad','rfybear','etika','sneed','retardedchildren','bruh','autism','doot','kylieface','queenyes','wholesomeseal','gigachadglow','gigachadorthodox','gigachad','gigachad2','gigachad3'] } ruqq = document.getElementById('EMOJIS_ruqqie') diff --git a/files/classes/user.py b/files/classes/user.py index 3f8913c3e..dbecccfe6 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -193,6 +193,23 @@ class User(Base): return time.strftime("%d %b %Y", time.gmtime(self.created_utc)) + @property + @lazy + def discount(self): + if self.patron == 1: discount = 0.90 + elif self.patron == 2: discount = 0.85 + elif self.patron == 3: discount = 0.80 + elif self.patron == 4: discount = 0.75 + elif self.patron == 5: discount = 0.70 + elif self.patron == 6: discount = 0.65 + else: discount = 1 + + for badge in [69,70,71,72,73]: + if self.has_badge(badge): discount -= discounts[badge] + + return discount + + @property @lazy def user_awards(self): diff --git a/files/routes/awards.py b/files/routes/awards.py index c72b7f7fa..ea7b965c4 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -21,21 +21,9 @@ def shop(v): for useraward in g.db.query(AwardRelationship).filter(AwardRelationship.user_id == v.id, AwardRelationship.submission_id == None, AwardRelationship.comment_id == None).all(): if useraward.kind in AWARDS: AWARDS[useraward.kind]["owned"] += 1 - if v.patron == 1: discount = 0.90 - elif v.patron == 2: discount = 0.85 - elif v.patron == 3: discount = 0.80 - elif v.patron == 4: discount = 0.75 - elif v.patron == 5: discount = 0.70 - elif v.patron == 6: discount = 0.65 - elif v.patron == 7: discount = 0.60 - else: discount = 1 - - for badge in [69,70,71,72,73]: - if v.has_badge(badge): discount -= discounts[badge] - for val in AWARDS.values(): val["baseprice"] = int(val["price"]) - val["price"] = int(val["price"]*discount) + val["price"] = int(val["price"] * v.discount) sales = g.db.query(func.sum(User.coins_spent)).scalar() return render_template("shop.html", awards=list(AWARDS.values()), v=v, sales=sales) @@ -55,18 +43,7 @@ def buy(v, award): if award not in AWARDS: abort(400) price = AWARDS[award]["price"] - if v.patron == 1: discount = 0.90 - elif v.patron == 2: discount = 0.85 - elif v.patron == 3: discount = 0.80 - elif v.patron == 4: discount = 0.75 - elif v.patron == 5: discount = 0.70 - elif v.patron == 6: discount = 0.65 - else: discount = 1 - - for badge in [69,70,71,72,73]: - if v.has_badge(badge): discount -= discounts[badge] - - price = int(price*discount) + price = int(price * v.discount) if request.values.get("mb"): if v.procoins < price: return {"error": "Not enough marseybux."}, 400 diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index 70c5db047..d4e45271a 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -13,7 +13,7 @@
{% for award in v.user_awards %} - +
{{award.title}}
{{award.owned}} owned
diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index 3b82829b1..99a8d7312 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -94,4 +94,4 @@
- \ No newline at end of file + \ No newline at end of file