forked from rDrama/rDrama
1
0
Fork 0

Merge branch 'master' of https://github.com/Aevann1/Drama into snow

master
Aevann1 2021-12-14 23:02:01 +02:00
commit 2d02ea7ce9
3 changed files with 42 additions and 8 deletions

View File

@ -512,10 +512,10 @@ AWARDS = {
},
"lootbox": {
"kind": "lootbox",
"title": "Homoween Lootbox",
"title": "Lootstocking",
"description": "???",
"icon": "fas fa-treasure-chest",
"color": "text-orange",
"icon": "fas fa-stocking",
"color": "text-red",
"price": 1000
},
"shit": {
@ -720,6 +720,13 @@ AWARDS2 = {
"description": "???",
"icon": "fas fa-angry",
"color": "text-green-500",
},
"lootbox": {
"kind": "lootbox",
"title": "Lootstocking",
"description": "???",
"icon": "fas fa-stocking",
"color": "text-red",
"price": 1000
},
"shit": {

View File

@ -99,6 +99,13 @@ def shop(v):
"description": "???",
"icon": "fas fa-angry",
"color": "text-green-500",
},
"lootbox": {
"kind": "lootbox",
"title": "Lootstocking",
"description": "???",
"icon": "fas fa-stocking",
"color": "text-red",
"owned": 0,
"price": 1000
},
@ -300,6 +307,7 @@ def shop(v):
@validate_formkey
def buy(v, award):
AWARDS = {
<<<<<<< HEAD
"snow": {
"kind": "snow",
"title": "Snow",
@ -346,6 +354,13 @@ def buy(v, award):
"description": "???",
"icon": "fas fa-angry",
"color": "text-green-500",
},
"lootbox": {
"kind": "lootbox",
"title": "Lootstocking",
"description": "???",
"icon": "fas fa-stocking",
"color": "text-red",
"price": 1000
},
"shit": {
@ -550,13 +565,25 @@ def buy(v, award):
g.db.add(new_badge)
g.db.add(v)
g.db.add(v)
g.db.flush()
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id
thing += 1
award = AwardRelationship(id=thing, user_id=v.id, kind=award)
g.db.add(award)
if award == "lootbox":
send_notification(995, f"@{v.username} bought a lootbox!")
for i in [1,2,3,4,5]:
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id
thing += 1
award = random.choice(["snow", "gingerbread", "lights", "candycane", "fireplace"])
award = AwardRelationship(id=thing, user_id=v.id, kind=award)
g.db.add(award)
g.db.flush()
else:
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id
thing += 1
award = AwardRelationship(id=thing, user_id=v.id, kind=award)
g.db.add(award)
g.db.commit()

View File

@ -44,7 +44,7 @@
<link rel="stylesheet" href="/assets/css/main-deprecated.css?v=190"><link rel="stylesheet" href="/assets/css/{{'DEFAULT_THEME' | app_config}}.css?v=190">
{% endif %}
<link href="/assets/css/fa.css?v=190" rel="stylesheet">
<link href="/assets/css/fa.css?v=192" rel="stylesheet">
</head>
<body id="settings2" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">