add spider award
parent
7615378a24
commit
272e39ebf2
|
@ -6267,3 +6267,7 @@ div.markdown {
|
|||
::-webkit-input-placeholder {
|
||||
opacity: 0.7 !important;
|
||||
}
|
||||
|
||||
.text-brown {
|
||||
color: #433722;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
new SpiderController({
|
||||
imageSprite: "/i/spider-sprite.webp",
|
||||
canDie: false,
|
||||
minBugs: 1,
|
||||
maxBugs: 1,
|
||||
mouseOver: "fly"
|
||||
})
|
|
@ -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")
|
||||
|
|
|
@ -584,6 +584,14 @@ AWARDS = {
|
|||
"icon": "fab fa-twitter",
|
||||
"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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
alter table users add column spider int;
|
Loading…
Reference in New Issue