From 639e88248be2ae36a3f4eb5c0dc41d4984451eb8 Mon Sep 17 00:00:00 2001 From: Kaan Soral Date: Mon, 11 Aug 2025 21:21:21 +0300 Subject: [PATCH] Patron's Grace buff system prep --- api.py | 1 + config.py | 12 ++++----- design/conditions.py | 12 +++++++++ design/precomputed.py | 2 +- js/game.js | 4 +++ node/server.js | 55 ++++++++++++++++++++++++++++++++++++++-- node/server_functions.js | 10 +++++--- 7 files changed, 84 insertions(+), 12 deletions(-) diff --git a/api.py b/api.py index 8a44cb4..e7b28c1 100644 --- a/api.py +++ b/api.py @@ -1389,6 +1389,7 @@ def stop_character_api(**args): def sync_character_api(**args): self,domain,user,server,id,data,user_data,unmount=gdmuld(args,"self","domain","user","server","character","data","user_data","unmount"); retries=3 + #logging.info(data.keys()) if unmount: logging.info("Unmount mode") retries=16 diff --git a/config.py b/config.py index 9c68614..94f27cb 100644 --- a/config.py +++ b/config.py @@ -117,12 +117,12 @@ if is_production: game_version=822 SALES=4+5+388+5101+125/20 #donation+manual+macos+steam+sales update_notes=[ - "Last Update [June 8th]", - "Monsters with the stationary flag no longer move", - "added the npcs's to the bank_u floor #177", - "Resist orbs #178", - "moved gpurplepro spawn area #180", - "make xmage stages humanoid #182", + "Last Update [August 7th]", + "PR: Fix display of Orb of Adventures #183", + "PR: Fix Sanguine Amulet #185", + "PR: Fix display of Frozen to correctly show speed reduction, fix value in G.conditions.poisoned to reflect actual frequency multiplier #188", + "PR: Explanations for all conditions #189", + "PR: Stop orbs from spamming game events #190", ] 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", diff --git a/design/conditions.py b/design/conditions.py index 4dc9e4b..52fff9c 100644 --- a/design/conditions.py +++ b/design/conditions.py @@ -269,6 +269,18 @@ conditions={ "ui":True, "persistent":True, }, + "patronsgrace":{ + "skin":"patronsgrace", + "name":"Patron's Grace", + "explanation":"This server has been graced by a patron's support!", + "luck":5, + "gold":5, + "xp":20, + "speed":1, + "duration":60*60*1000, + "buff":True, + "ui":True, + }, "notverified":{ "skin":"notverified", "name":"Not Verified", diff --git a/design/precomputed.py b/design/precomputed.py index 6c846c9..dbaace5 100644 --- a/design/precomputed.py +++ b/design/precomputed.py @@ -1,2 +1,2 @@ -# Thu Apr 24 2025 07:25:16 GMT+0300 (GMT+03:00) +# Sun Jun 08 2025 17:40:40 GMT+0300 (GMT+03:00) images={"/images/tiles/characters/ninja_turtles.png":{"height":144,"width":312,"type":"png"},"/images/cosmetics/makeup/makeup1.png":{"height":120,"width":1134,"type":"png"},"/images/cosmetics/hairdo/bwhair.png":{"height":120,"width":27,"type":"png"},"/images/cosmetics/beardo/burningeyes1_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/beardo/burningeyes2_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/hats/bathat_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/hats/gcandle_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/hats/halo_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/makeup/kunique.png":{"height":120,"width":108,"type":"png"},"/images/cosmetics/skins/mbw.png":{"height":144,"width":81,"type":"png"},"/images/cosmetics/armors/mabw.png":{"height":144,"width":162,"type":"png"},"/images/cosmetics/accessories/kglasses.png":{"height":120,"width":108,"type":"png"},"/images/cosmetics/gravestones/gravestone.png":{"height":64,"width":160,"type":"png"},"/images/tiles/monsters/deep_sea_king.png":{"height":320,"width":318,"type":"png"},"/images/tiles/characters/adversaries.png":{"height":288,"width":324,"type":"png"},"/images/tiles/characters/angel_wingless.png":{"height":288,"width":456,"type":"png"},"/images/tiles/characters/winners_jpa.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/winners_jpb.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/sheet_winnersa.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/sheet_winnersb.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/collection1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/collection2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/collection3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/collectionx.png":{"height":288,"width":456,"type":"png"},"/images/tiles/monsters/snowman.png":{"height":144,"width":76,"type":"png"},"/images/tiles/monsters/Dragold.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/blackscorpion.png":{"height":256,"width":176,"type":"png"},"/images/tiles/monsters/coboldProto.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/liger_x.png":{"height":184,"width":150,"type":"png"},"/images/tiles/monsters/tiger.png":{"height":184,"width":150,"type":"png"},"/images/tiles/monsters/slenderman.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/frankenstein.png":{"height":144,"width":76,"type":"png"},"/images/tiles/characters/custom1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/custom2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/custom3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/others/jsonX.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/mecha_gnome.png":{"height":144,"width":78,"type":"png"},"/images/tiles/monsters/harpy_b_1.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/harpy_b_fly_1.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/harpy_a_1.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/harpy_a_fly_1.png":{"height":212,"width":156,"type":"png"},"/images/tiles/characters/others/ship2.png":{"height":64,"width":201,"type":"png"},"/images/tiles/characters/others/newyear_tree.png":{"height":64,"width":144,"type":"png"},"/images/tiles/characters/bonus1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/military2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/military3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/knights.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara4.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara6.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara7.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara8.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/automatron2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc4.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc5.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc6.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/dwarf2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/tristone_m.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/tristone_f.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/mystics.png":{"height":144,"width":312,"type":"png"},"/images/tiles/monsters/creatures1.png":{"height":144,"width":312,"type":"png"},"/images/tiles/monsters/creatures2.png":{"height":424,"width":624,"type":"png"},"/images/tiles/monsters/jrpumpkins.png":{"height":144,"width":155,"type":"png"},"/images/tiles/characters/chara5.png":{"height":288,"width":312,"type":"png"},"/images/tiles/items/chests.png":{"height":288,"width":504,"type":"png"},"/images/tiles/characters/animationc.png":{"height":400,"width":564,"type":"png"},"/images/tiles/characters/animation1i.png":{"height":400,"width":564,"type":"png"},"/images/tiles/characters/animation2.png":{"height":400,"width":564,"type":"png"},"/images/tiles/characters/animation3.png":{"height":400,"width":564,"type":"png"},"/images/tiles/monsters/elemental.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/monster_dknight1.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_dknight2.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/fairies.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/monster_bird1.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/monster_bird2.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/monster_bird3.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/monster_boar.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/monster_cacto.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/rudolphi.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/monster_elk.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/monster_golem1.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_golem2.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_lich.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_lizardman1.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_lizardman2.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/stompy3.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_minotaur.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_phoenix.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/monster_raptor1.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_raptor2.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/grinch.png":{"height":144,"width":82,"type":"png"},"/images/tiles/monsters/monster_treant.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_wolf1.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/monster_wolf2.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/json.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/custom1.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/custom2.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/goos.png":{"height":256,"width":360,"type":"png"},"/images/tiles/monsters/monster1.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/animals1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/animals2.png":{"height":288,"width":504,"type":"png"},"/images/tiles/monsters/birds1_modded.png":{"height":288,"width":504,"type":"png"},"/images/tiles/monsters/goblinos.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/goblinkingb.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/monsterc6.png":{"height":512,"width":692,"type":"png"},"/images/tiles/monsters/tinyfairies.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/monsterc2.png":{"height":400,"width":564,"type":"png"},"/images/tiles/monsters/robots.png":{"height":288,"width":372,"type":"png"},"/images/tiles/monsters/mage.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/monster2.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/monster3c.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/monster4.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/vampire2d.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/mr_pumpkin.png":{"height":144,"width":80,"type":"png"},"/images/tiles/monsters/cbee.png":{"height":144,"width":78,"type":"png"},"/images/tiles/monsters/iceGolem.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/green.png":{"height":144,"width":80,"type":"png"},"/images/tiles/monsters/robots_walkin_B_1.png":{"height":288,"width":372,"type":"png"},"/images/tiles/monsters/dryad_green_1.png":{"height":144,"width":78,"type":"png"},"/images/tiles/monsters/mondinos_1.png":{"height":288,"width":456,"type":"png"},"/images/tiles/monsters/giantspider.png":{"height":384,"width":480,"type":"png"},"/images/sprites/emblems/emblems.png":{"height":96,"width":480,"type":"png"},"/images/cosmetics/skins/sskin1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/skins/mskin1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/skins/lskin1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/sbody1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody2.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody3.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody4.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody5.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody6.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/sarmor1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/sarmor2.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor2.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor3.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor4.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor5.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor6.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor7.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor8.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor9.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor10.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor11.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor12.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/larmor1.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/lchar1.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/mchar16.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/schar7.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/xschar2.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/xxschar2.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/hairdo/hairdo1.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo2.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo3.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo4.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo5.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo6.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hats/hats1.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hats/hats2.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hats/hats3.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hats/hats4.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/wings/wings1.png":{"height":144,"width":185,"type":"png"},"/images/cosmetics/wings/wings2.png":{"height":144,"width":128,"type":"png"},"/images/cosmetics/wings/wings3.png":{"height":144,"width":185,"type":"png"},"/images/cosmetics/wings/backpacks.png":{"height":144,"width":185,"type":"png"},"/images/cosmetics/wings/backpack2.png":{"height":144,"width":185,"type":"png"},"/images/cosmetics/tails/wolftail.png":{"height":144,"width":108,"type":"png"},"/images/cosmetics/tails/wolftail2.png":{"height":144,"width":108,"type":"png"},"/images/cosmetics/tails/wolftail3.png":{"height":144,"width":108,"type":"png"},"/images/cosmetics/makeup/smakeup.png":{"height":120,"width":27,"type":"png"},"/images/cosmetics/makeup/malemakeup.png":{"height":120,"width":378,"type":"png"},"/images/cosmetics/makeup/femalemakeupv2.png":{"height":120,"width":351,"type":"png"},"/images/cosmetics/makeup/fmakeup.png":{"height":120,"width":351,"type":"png"},"/images/cosmetics/accessories/eyeglasses.png":{"height":120,"width":1107,"type":"png"},"/images/cosmetics/beardo/beard1.png":{"height":120,"width":1107,"type":"png"},"/images/cosmetics/beardo/mask1.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/beardo/facemakeup.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/makeup/male_makeup.png":{"height":120,"width":567,"type":"png"},"/images/cosmetics/makeup/female_makeup.png":{"height":120,"width":621,"type":"png"},"/images/cosmetics/makeup/unisex_makeup.png":{"height":120,"width":648,"type":"png"},"/images/tiles/items/pack_1a.png":{"height":2048,"width":256,"type":"png"},"/images/tiles/items/pack_20vt8.png":{"height":1280,"width":320,"type":"png"},"/images/tiles/items/skills_20v6.png":{"height":260,"width":320,"type":"png"},"/images/tiles/items/custom.png":{"height":180,"width":140,"type":"png"},"/images/tiles/items/community.png":{"height":180,"width":140,"type":"png"},"/images/tiles/map/castle.png":{"height":512,"width":544,"type":"png"},"/images/tiles/map/custom2.png":{"height":560,"width":752,"type":"png"},"/images/tiles/map/custom.png":{"height":480,"width":480,"type":"png"},"/images/tiles/map/custom_a.png":{"height":320,"width":320,"type":"png"},"/images/tiles/map/doors.png":{"height":256,"width":192,"type":"png"},"/images/tiles/map/dungeon.png":{"height":416,"width":912,"type":"png"},"/images/tiles/map/house.png":{"height":1168,"width":1104,"type":"png"},"/images/tiles/map/inside.png":{"height":816,"width":832,"type":"png"},"/images/tiles/map/outside.png":{"height":832,"width":904,"type":"png"},"/images/tiles/map/puzzle.png":{"height":320,"width":336,"type":"png"},"/images/tiles/map/water_updated.png":{"height":1200,"width":704,"type":"png"},"/images/tiles/map/winter.png":{"height":640,"width":912,"type":"png"},"/images/tiles/map/fort.png":{"height":832,"width":656,"type":"png"},"/images/tiles/map/beach_v2.png":{"height":416,"width":576,"type":"png"},"/images/tiles/map/world.png":{"height":288,"width":432,"type":"png"},"/images/tiles/items/stands.png":{"height":144,"width":78,"type":"png"},"/images/tiles/map/new.png":{"height":480,"width":672,"type":"png"},"/images/tiles/map/dark_dimension.png":{"height":336,"width":464,"type":"png"},"/images/tiles/map/jungle.png":{"height":336,"width":496,"type":"png"},"/images/tiles/map/ship.png":{"height":448,"width":864,"type":"png"},"/images/tiles/map/ashlands.png":{"height":336,"width":640,"type":"png"},"/images/tiles/map/ruins.png":{"height":832,"width":704,"type":"png"},"/images/tiles/map/tree.png":{"height":576,"width":544,"type":"png"},"/images/tiles/map/lights.png":{"height":480,"width":640,"type":"png"}} diff --git a/js/game.js b/js/game.js index 4a9b440..a0edffe 100644 --- a/js/game.js +++ b/js/game.js @@ -1330,6 +1330,10 @@ function init_socket(args) $(".saferespawn").show(); } else add_log("Note: Game dynamics and drops aren't final, they are evolving with every update","gray"); + if(data.blessed_by) + { + add_log("This server has been blessed by "+data.blessed_by,"#8F70D8"); + } // add_log("Warning: A Chrome bug is causing memory leaks, very small but it adds up. They patched the bug, however, that patch didn't make it to our browsers yet","#E08583"); $(".charactername").html(character.name); page.title=character.name; diff --git a/node/server.js b/node/server.js index cbfb7a1..87c622c 100644 --- a/node/server.js +++ b/node/server.js @@ -578,6 +578,7 @@ function player_to_server(player, place) { "width", "height", "u", + "user", ]) ) { char[prop] = player[prop]; @@ -6998,6 +6999,37 @@ function init_io() { ); success_response({ success: false, in_progress: true }); }); + socket.on("bless_server", function (data) { + var player = players[socket.id]; + if (!player || player.user || gameplay == "hardcore" || gameplay == "test") { + return fail_response("cant_in_bank"); + } + var cost = 1200; + if (player.blessing) return fail_response("in_progress"); + player.blessing = true; + appengine_call( + "bill_user", + { auth: player.auth, amount: cost, reason: "blessing", name: player.name }, + function (result) { + player.blessing = false; + server_log("buy_with_cash: " + JSON.stringify(result)); + if (result.failed || !result.done) { + socket.emit("game_log", "Purchase failed"); + return; + } + player.cash = result.cash; + + S.blessed_minutes = 60 * 24 * 7; + S.blessed_by = player.name; + + socket.emit("game_log", "Spent " + to_pretty_num(cost) + " shells"); + + resend(player, "reopen+nc+inv"); + bless_loop(); + }, + ); + success_response({ success: false, in_progress: true }); + }); socket.on("sbuy", function (data) { var player = players[socket.id]; var done = false; @@ -9833,6 +9865,11 @@ function init_io() { cdata.base_gold = D.base_gold; broadcast_e(true); cdata.s_info = E; + if (S.blessed_minutes) { + cdata.blessed_by = S.blessed_by; + cdata.blessed_minutes = S.blessed_minutes; + player.s.patronsgrace = { ms: G.conditions.patronsgrace.duration, f: S.blessed_by }; + } if (result.code) { cdata.code = result.code; cdata.code_slot = result.code_slot; @@ -12425,7 +12462,7 @@ function update_instance(instance) { response: "compound_success", stale: ref.stale, level: item.level, - num: data.num, + num: ref.num, up: item.extra || undefined, }, ]); @@ -12449,7 +12486,7 @@ function update_instance(instance) { var def = G.items[item.name]; player.hitchhikers.push([ "game_response", - { response: "compound_fail", level: item.level, num: data.num, stale: ref.stale }, + { response: "compound_fail", level: item.level, num: ref.num, stale: ref.stale }, ]); if (calculate_item_value(item) + (def.edge || 0) * 2000000 > 920000 && !player.stealth) { broadcast("server_message", { @@ -13042,6 +13079,20 @@ function npc_loop() { setTimeout(npc_loop, max(28, min(1000, ms_since * 2 + 2))); // originally 24 } +function bless_loop() { + if (S.blessed_minutes) S.blessed_minutes--; + if (!S.blessed_minutes) return; + for (var id in players) { + var player = players[id], + rs = false; + if (!player.s.patronsgrace) rs = true; + player.s.patronsgrace = { ms: G.conditions.patronsgrace.duration, f: S.blessed_by }; + if (rs) resend(player, "u+cid"); + } +} + +setInterval(bless_loop, 60 * 1000); + function game_loop() { // back in the day pretty much everything was in here [11/08/22] if (!server.live) { diff --git a/node/server_functions.js b/node/server_functions.js index dacb4e1..4279058 100644 --- a/node/server_functions.js +++ b/node/server_functions.js @@ -3191,7 +3191,8 @@ function xy_upush_logic(element) { } function appengine_call(method, args, on_success, on_error) { - var api_path = "/api/" + method; + var api_path = "/api/" + method, + suffix = ""; if ( mode.prevent_external && !in_arr(method, ["create_server", "update_server", "stop_server", "start_character", "send_mail"]) @@ -3222,14 +3223,17 @@ function appengine_call(method, args, on_success, on_error) { } if (args.suffix) { api_path += args.suffix; + suffix = args.suffix; delete args.suffix; } - data = { + var arguments = JSON.stringify(args); + var data = { method: method, - arguments: JSON.stringify(args), + arguments: arguments, server_auth: server_id + "-" + server_auth, auth: args.auth, }; + if (suffix.includes("unmount")) console.log(arguments.length); try { request.post({ url: base_url + api_path, form: data }, function (err, response, body) { try {