make gold and glowie mutually exclusive

pull/221/head
Aevann 2024-01-11 04:01:18 +02:00
parent 55b6ef51fa
commit cede2241d1
1 changed files with 6 additions and 0 deletions

View File

@ -557,6 +557,12 @@ def award_thing(v, thing_type, id):
elif kind in {"ectoplasm", "candycorn", "candycane", "stab", "tilt"}:
if obj.is_effortpost:
abort(403, f'Effortposts are protected from the {award_title} award!')
elif kind == "gold":
if obj.award_count('glowie', v):
abort(409, f"This {thing_type} is under the effect of a conflicting award: Glowie award!")
elif kind == "glow":
if obj.award_count('gold', v):
abort(409, f"This {thing_type} is under the effect of a conflicting award: Gold award!")
elif kind == "spider":
if author.spider: author.spider += 86400
else: author.spider = int(time.time()) + 86400