Lunar New Year Event

This commit is contained in:
Kaan Soral
2024-01-19 21:03:07 +03:00
parent 887a3e859b
commit 97b61095ed
10 changed files with 61 additions and 28 deletions
+25
View File
@@ -78,6 +78,31 @@ class CommunityMapEditor(webapp.RequestHandler):
copy_map(name,"test")
self.response.out.write(to_pretty_num(olen(map.info.data)))
class ArtistMapEditor(webapp.RequestHandler):
# from /admin/executor set the user.info.map_editor flag to True for artists, this also unlocks the interface in the game menu
@ndb.toplevel
def get(self,name):
if not name: return
name=name.split("/")[0]
domain=gdi(self); user=get_user(self,domain)
if not user or not gf(user,"map_editor"): return self.response.out.write("Not Permitted!")
map=get_by_iid("map|%s"%name)
whtml(self,"utility/htmls/map_editor.html",domain=domain,name="main",map=map,tilesets=tilesets,community=1)
@ndb.toplevel
def post(self,name):
data=self.request.get("data")
name=name.split("/")[0]
domain=gdi(self); user=get_user(self,domain)
if not user or not gf(user,"map_editor"): return self.response.out.write("Not Permitted!")
map=get_by_iid("map|%s"%name)
if not map: map=Map(key=ndb.Key(Map,name),info=GG())
map.info.data=json.loads(data)
process_map(map)
map.updated=datetime.now()
map.put()
copy_map(name,"test")
self.response.out.write(to_pretty_num(olen(map.info.data)))
class MapEditor(webapp.RequestHandler):
@ndb.toplevel
def get(self,name):
+6 -5
View File
@@ -1,5 +1,7 @@
# This Python file uses the following encoding: utf-8
from __future__ import with_statement
# Python3 compatibility [06/01/24]
from __future__ import print_function
import os,logging,cgi
if os.environ.get('SERVER_SOFTWARE', '').startswith('Dev'):
try:
@@ -80,13 +82,12 @@ if is_production:
#maps["desertland"]["key"]="jayson_desertland_copy"
pass
game_version=783
game_version=785
SALES=4+5+388+5101+125/20 #donation+manual+macos+steam+sales
update_notes=[
"Happy Holidays!",
"Last Update [December 8th]",
"Skill related pull requests from the community merged.",
"Holiday season on Adventure Land!",
"Lunar New Year Event",
"Last Update [19th of January]",
"Adding Python3 compatibility",
]
ip_to_subdomain={ #IMPORTANT: SPECIAL PAGE RULES ARE NEEDED: https://dash.cloudflare.com/b6f5a13bded5fdd273e4a1cd3777162d/adventure.land/page-rules - uss1 / eus1 was best
"35.187.255.184":"asia1",
+5 -5
View File
@@ -13,10 +13,10 @@ drops={
],
"global":[
[0.00001,"ornament"],
[0.00003,"mistletoe"],
[0.00001,"candycane"],
[0.000001,"open","xN"],
#[0.00001,"ornament"],
#[0.00003,"mistletoe"],
#[0.00001,"candycane"],
#[0.000001,"open","xN"],
#[0.00006,"ornament"],
#[0.00018,"mistletoe"],
#[0.00005,"candycane"],
@@ -36,7 +36,7 @@ drops={
#[0.009,"open","eastereggs"], #originally 0.009
#[0.0001,"redenvelopev2"],
#[0.0001,"redenvelopev3"],
#[0.00005,"greenenvelope"],
[0.00005,"greenenvelope"],
#[0.0001,"redenvelopev4"],
#[0.001,"candypop"],
],
+3 -3
View File
@@ -5369,7 +5369,7 @@ gems={
"a":True,
"s":True,
#"event":True,
"quest":"mistletoe", #xmas
#"quest":"mistletoe", #xmas
},
"candycane":{
"type":"gem",
@@ -5381,7 +5381,7 @@ gems={
"s":True,
"a":True,
#"event":True,
"quest":"candycane", #xmas
#"quest":"candycane", #xmas
},
"gift0":{
"type":"gem",
@@ -5710,7 +5710,7 @@ quest={
"g":3000,
"e":20,
"s":True,
"quest":"ornament", #xmas
#"quest":"ornament", #xmas
},
"lostearring":{
"type":"earring",
+8 -8
View File
@@ -247,7 +247,7 @@ maps={
"key":"jayson_bank",
"key":"jayson_bank0",
#"key":"jayson_bank_xmas",
"key":"jayson_bank0.Xmas", #xmas
#"key":"jayson_bank0.Xmas", #xmas
"name":"The Bank",
"npcs":[
{"id":"goldnpc","position":[1,-416]},
@@ -543,8 +543,8 @@ maps={
"key":"jayson_ALMap2_v2",
#"key":"jayson_ALMap2_v2.Xmas",
#"key":"jayson_ALMap2_v2.CNewYear",
"key":"jayson_ALMap2_v2_xmas", #xmas
#"key":"jayson_ALMap2_v2.lunarNewYear",
#"key":"jayson_ALMap2_v2_xmas", #xmas
"key":"jayson_ALMap2_v2.lunarNewYear",
"name":"Mainland",
"npcs":[
#{"id":"newupgrade","position":[-203,-174]},
@@ -585,7 +585,7 @@ maps={
{"id":"pvptokens","position":[159,403]},
{"id":"monsterhunter","position":[126,-413]},
{"id":"mcollector","position":[81,-283,1]},
{"id":"newyear_tree","position":[64,-88]}, #xmas
#{"id":"newyear_tree","position":[64,-88]}, #xmas
],
"monsters":[
#square
@@ -1035,7 +1035,7 @@ maps={
{"id":"citizen1","position":[0,-5]},
{"id":"citizen5","position":[0,-5]},
{"id":"citizen6","position":[0,-5]},
{"id":"mistletoe","position":[94,-181,2]}, #xmas
#{"id":"mistletoe","position":[94,-181,2]}, #xmas
],
"monsters":[
],
@@ -1162,8 +1162,8 @@ maps={
"npcs":[
{"id":"leathermerchant","position":[262,-48.5]},
{"id":"transporter","position":[-73,-393]},
{"id":"santa","position":[1242,-1631]}, #xmas
{"id":"ornaments","position":[-137,-193,1]}, #xmas
#{"id":"santa","position":[1242,-1631]}, #xmas
#{"id":"ornaments","position":[-137,-193,1]}, #xmas
{"id":"guard","position":[1065,-2015]},
{"id":"citizen7","position":[-15,5]},
{"id":"citizen8","position":[-15,5]},
@@ -1173,7 +1173,7 @@ maps={
"monsters":[
{"type":"stompy","boundary":[30,-2954,836,-2536],"count":1},
{"type":"wolf","boundary":[30,-2954,836,-2536],"count":7},
{"type":"rudolph","boundary":[1065,-1598,1418,-1449],"count":1}, #xmas
#{"type":"rudolph","boundary":[1065,-1598,1418,-1449],"count":1}, #xmas
{"type":"arcticbee","boundary":[682,-967,1482,-779],"count":10,"grow":True},
{"type":"wolfie","boundary":[-367,-2234,29,-1819],"count":4},
{"type":"wolfie","boundary":[236,-2232,460,-1847],"count":3},
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -9,9 +9,9 @@
<span class='spdragold'></span> Dragold spanws every 3 hours. Take a chance to capture one of the very rare drops. A unique crown as a cosmetics item and Dragold's chrysalis! (to have a Dragold as a pet!)
</p>
<p>
{#<p>
<span class='sptiger'></span> The Legendary Tiger appears to players and drops Tiger set items each time you manage to land a hit! Make sure to not hurt this peaceful and giving animal!
</p>
</p>#}
<div style='margin-bottom: 24x'></div>
+2 -1
View File
@@ -1,6 +1,6 @@
from config import *
from functions import *
from admin import CommunityMapEditor,Selector,Items
from admin import CommunityMapEditor,ArtistMapEditor,Selector,Items
from api import load_code_api
class MainHandler(webapp.RequestHandler):
@@ -481,6 +481,7 @@ application = webapp.WSGIApplication([
('/docs/?(.*)',DocsHandler),
('/map/(.*)/?(.*)',ResortEditor),
('/communitymaps/?(.*)', CommunityMapEditor),
('/editmap/?(.*)', ArtistMapEditor),
('/communityselector/?(.*)', Selector),
('/communityitems', Items),
('/shells', PaymentsHandler),
+8 -2
View File
@@ -169,8 +169,8 @@ var mode = {
};
var events = {
// SEASONS
holidayseason: true,
lunarnewyear: false,
holidayseason: false,
lunarnewyear: true,
valentines: false,
pinkgoo: 0, // every N minutes - 60
snowman: 20 * 60, // 1200 normally - 60 - at sprocess_game_data
@@ -10497,6 +10497,12 @@ function init_io() {
}
}
});
socket.on("skin",function(data){
var player = players[socket.id];
if(player.role!="gm") return;
player.tskin=data.name;
resend(player, "u+cid");
});
socket.on("legacify", function (data) {
var player = players[socket.id];
if (!player || player.rip) {
+1 -1
View File
@@ -2092,7 +2092,7 @@ function event_loop() {
["holidayseason", "grinch"],
["holidayseason", "snowman"],
["lunarnewyear", "dragold"],
["lunarnewyear", "tiger", true],
//["lunarnewyear", "tiger", true],
["valentines", "pinkgoo", true],
["egghunt", "wabbit", true],
];