add spider award

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-20 19:52:52 +02:00
parent 7615378a24
commit 272e39ebf2
9 changed files with 33 additions and 2 deletions

View File

@ -6266,4 +6266,8 @@ div.markdown {
::-webkit-input-placeholder {
opacity: 0.7 !important;
}
.text-brown {
color: #433722;
}

View File

@ -0,0 +1,7 @@
new SpiderController({
imageSprite: "/i/spider-sprite.webp",
canDie: false,
minBugs: 1,
maxBugs: 1,
mouseOver: "fly"
})

View File

@ -142,6 +142,7 @@ class User(Base):
owoify = Column(Integer)
marsify = Column(Integer, default=0)
rainbow = Column(Integer)
spider = Column(Integer)
badges = relationship("Badge", order_by="Badge.created_utc", back_populates="user")
subscriptions = relationship("Subscription", back_populates="user")

View File

@ -585,6 +585,14 @@ AWARDS = {
"color": "text-blue",
"price": 1500
},
"spider": {
"kind": "Spider!",
"title": "Spider!",
"description": f"Summons a spider to terrorize the recipient for 24 hours.",
"icon": "fas fa-spider",
"color": "text-brown",
"price": 2000
},
"agendaposter": {
"kind": "agendaposter",
"title": "Chud",

View File

@ -405,6 +405,12 @@ def award_thing(v, thing_type, id):
if author.rainbow: author.rainbow += 86400
else: author.rainbow = int(time.time()) + 86400
badge_grant(user=author, badge_id=171)
elif kind == "spider":
if author.id == CARP_ID:
return {"error": "Carp is immune to the spider award!"}, 403
if author.spider: author.spider += 86400
else: author.spider = int(time.time()) + 86400
badge_grant(user=author, badge_id=179)
if author.received_award_count: author.received_award_count += 1
else: author.received_award_count = 1

View File

@ -385,6 +385,10 @@
<script defer src="/assets/js/lite-youtube.js?v=4000"></script>
{% if v and v.spider %}
<script defer src="/assets/js/critters.js?v=4000"></script>
<script defer src="/assets/js/spider.js?v=4000"></script>
{% endif %}
</body>
</html>

View File

@ -1,6 +1,6 @@
{%-
set CACHE_VER = {
'css/main.css': 4032,
'css/main.css': 4033,
'css/catalog.css': 4007,
'css/4chan.css': 4007,
'css/classic.css': 4030,

View File

@ -1 +1 @@
alter table users drop column winnings;
alter table users drop column winnings;

View File

@ -0,0 +1 @@
alter table users add column spider int;