make submitted hats prices 1000 when animated

master
Aevann1 2022-09-11 16:35:34 +02:00
parent 4fd3ebc967
commit 1e49bb9e2c
1 changed files with 4 additions and 1 deletions

View File

@ -221,11 +221,14 @@ def submit_hat(v):
os.remove(highquality)
return error("Images must be 100x130")
if len(list(Iterator(i))) > 1: price = 1000
else: price = 500
filename = f'/asset_submissions/hats/{name}.webp'
copyfile(highquality, filename)
process_image(filename)
hat = HatDef(name=name, author_id=author.id, description=description, price=500, submitter_id=v.id)
hat = HatDef(name=name, author_id=author.id, description=description, price=price, submitter_id=v.id)
g.db.add(hat)
g.db.commit()