forked from rDrama/rDrama
1
0
Fork 0

more hats

master
Aevann1 2022-09-03 02:48:01 +02:00
parent f92a33fb04
commit 09d1e4d887
35 changed files with 21 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -297,6 +297,19 @@ def comment(v):
price=hat["price"]
)
g.db.add(hat)
all_by_author = g.db.query(HatDef).filter_by(author_id=user.id).count()
# off-by-one: newly added hat isn't counted
if all_by_author >= 250:
badge_grant(badge_id=166, user=user)
elif all_by_author >= 100:
badge_grant(badge_id=165, user=user)
elif all_by_author >= 50:
badge_grant(badge_id=164, user=user)
elif all_by_author >= 10:
badge_grant(badge_id=163, user=user)
except Exception as e:
return {"error": str(e)}, 400
body += f"\n\n![]({image})"

View File

@ -52,12 +52,12 @@ def buy_hat(v, hat_id):
)
hat_count = g.db.query(Hat).filter_by(user_id=v.id).count()
if hat_count >= 24:
badge_grant(user=v.id, badge_id=152)
if hat_count >= 99:
badge_grant(user=ref_user, badge_id=153)
if hat_count >= 249:
badge_grant(user=ref_user, badge_id=154)
elif hat_count >= 99:
badge_grant(user=ref_user, badge_id=153)
elif hat_count >= 24:
badge_grant(user=v.id, badge_id=152)
return {"message": "Hat bought!"}

View File

@ -1604,7 +1604,7 @@ insert into hat_defs (name, description, author_id, price) values
('Top Hat (checkered)', 'Actually chessed, but that''s not really a word.', 1, 500),
('Top Hat (march hare)', 'April hare, May hare, June hare, July hare,', 1, 500),
('Top Hat (mad hatter)', 'Hatters mad [x24]', 1, 500),
('Top Hat', 'Top hat, menstrual edition', 1, 500),
('Top Hat (red)', 'Top hat, menstrual edition', 1, 500),
('Top Hat (uncle sam)', 'THIS HAT WAS FACT-CHECKED BY TRUE AMERICAN PATRIOTS', 1, 500),
('Fireperson I', 'In loving memory of r/HateForFirefighters', 1, 500),
('Constable', 'Useless bong cop nonsense', 1, 500),

View File

@ -182,7 +182,7 @@ insert into hat_defs (name, description, author_id, price) values
('Top Hat (checkered)', 'Actually chessed, but that''s not really a word.', 1, 500),
('Top Hat (march hare)', 'April hare, May hare, June hare, July hare,', 1, 500),
('Top Hat (mad hatter)', 'Hatters mad [x24]', 1, 500),
('Top Hat', 'Top hat, menstrual edition', 1, 500),
('Top Hat (red)', 'Top hat, menstrual edition', 1, 500),
('Top Hat (uncle sam)', 'THIS HAT WAS FACT-CHECKED BY TRUE AMERICAN PATRIOTS', 1, 500),
('Fireperson I', 'In loving memory of r/HateForFirefighters', 1, 500),
('Constable', 'Useless bong cop nonsense', 1, 500),