diff --git a/.DS_Store b/.DS_Store index 55df46a..9d665fb 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/design/drops.py b/design/drops.py index 15a7ecd..38c53fe 100644 --- a/design/drops.py +++ b/design/drops.py @@ -21,8 +21,8 @@ drops={ #[0.00018,"mistletoe"], #[0.00005,"candycane"], #[0.00001,"open","xN"], - [0.00005,"candy0"], #originally 4X [11/10/19] - [0.00125,"candy1"], #originally 4X [11/10/19] + #[0.00005,"candy0"], #originally 4X [11/10/19] + #[0.00125,"candy1"], #originally 4X [11/10/19] #[0.000015,"goldenegg"], #originally 0.000005 #[0.000001,"5bucks"], #[0.0002,"gift0"], diff --git a/design/precomputed.py b/design/precomputed.py index bc4e75d..44c0806 100644 --- a/design/precomputed.py +++ b/design/precomputed.py @@ -1,2 +1,2 @@ -# Wed Nov 08 2023 00:02:32 GMT+0300 (GMT+03:00) +# Fri Nov 10 2023 15:20:23 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/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/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/scripts/deploy.js b/scripts/deploy.js index 0fc0f4c..cb69705 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -1,4 +1,4 @@ -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); if(!f.in_args("nocheck") && f.read_file("~/thegame/stack/tocheck.txt")) // nocheck doesn't work [23/01/17] { diff --git a/scripts/electron_bundle.js b/scripts/electron_bundle.js index 943f7b4..c9aa3de 100644 --- a/scripts/electron_bundle.js +++ b/scripts/electron_bundle.js @@ -1,5 +1,5 @@ var image_size=require('image-size'),fs=require('fs'); -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); var images={}; f.execs("rm -rf ~/thegame/electron/files"); diff --git a/scripts/functions.js b/scripts/functions.js new file mode 100644 index 0000000..95debe1 --- /dev/null +++ b/scripts/functions.js @@ -0,0 +1,235 @@ +//var execsync=require('sync-exec'); +var child_process=require('child_process'); +var compressor=require("node-minify"),util=require("util"),fs=require("fs"),request=require('request'); +var really_old=new Date(0); + +function replace_all(str, find, replace) +{ + return str.replace(new RegExp(find.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'g'), replace); +} + +function cdate(time) // custom date/time format [12/06/15] +{ + var time_str="",current=new Date(),arr=[current.getHours(),current.getMinutes(),current.getDate(),current.getMonth()+1,current.getYear()]; + for(var i=0;i1000) logs=logs.slice(4,1200); + storage.setItem("logs",logs); +} + +function report_logs(storage) +{ + logs=storage.getItem("logs"); + if(!logs) logs=[]; + for(var i=0;inum) return process.argv[num]; + return false; +} + +function is_production() +{ + if(in_args("live") || in_args("production")) return " production "; + return ""; +} + +function is_sdk(){ return !is_production(); } + +function ch(path) +{ + path=path.replace("~",process.env.HOME); + process.chdir(path); +} + +function read_file(path) +{ + path=path.replace("~",process.env.HOME); + return fs.readFileSync(path,{encoding:'utf-8'}); +} + +function write_file(path,content) +{ + path=path.replace("~",process.env.HOME); + fs.writeFileSync(path,content); +} + +function mssince(t,ref) +{ + if(!ref) ref=new Date(); + return ref.getTime() - t.getTime(); +} +function ssince(t,ref) { return mssince(t,ref)/1000.0; } +function msince(t,ref) { return mssince(t,ref)/60000.0; } +function hsince(t,ref) { return mssince(t,ref)/3600000.0; } + +module.exports={ + util:util, format:util.format, + execs:execs, + execso:execso, + minify_all:minify_all, + is_production:is_production, + is_sdk:is_sdk, + ch:ch, + in_args:in_args, + get_arg:get_arg, + read_file:read_file, + write_file:write_file, + color:color, + ccolor:ccolor, + fetch:fetch, + in_between_from_file:in_between_from_file, + lib_version:lib_version, + mssince:mssince,ssince:ssince,msince:msince,hsince:hsince, + add_log:add_log,report_logs:report_logs, + really_old:really_old, + download:download, + string_to_int:string_to_int, + cdate:cdate, + sleep:sleep, + replace_all:replace_all, +} \ No newline at end of file diff --git a/scripts/keep_alive.js b/scripts/keep_alive.js index 4ee66d3..83c4939 100644 --- a/scripts/keep_alive.js +++ b/scripts/keep_alive.js @@ -1,4 +1,4 @@ -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); require(process.env.HOME+"/thegame/scripts/data.js"); setInterval(function(){ diff --git a/scripts/list_commands.js b/scripts/list_commands.js index 8ea28b2..756296c 100644 --- a/scripts/list_commands.js +++ b/scripts/list_commands.js @@ -1,4 +1,4 @@ -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); require(process.env.HOME+"/thegame/scripts/data.js"); servers.forEach(function(server){ diff --git a/scripts/list_servers.js b/scripts/list_servers.js index 109a0f8..3712721 100644 --- a/scripts/list_servers.js +++ b/scripts/list_servers.js @@ -1,4 +1,4 @@ -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); require(process.env.HOME+"/thegame/scripts/data.js"); for(var id in machines) diff --git a/scripts/precompute.js b/scripts/precompute.js index b82c914..4d9acd5 100644 --- a/scripts/precompute.js +++ b/scripts/precompute.js @@ -1,5 +1,5 @@ var image_size=require('image-size'),fs=require('fs'); -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); var images={}; var data=f.read_file("~/thegame/design/sprites.py"); diff --git a/scripts/prepare_server.js b/scripts/prepare_server.js index d264427..a2bb55b 100644 --- a/scripts/prepare_server.js +++ b/scripts/prepare_server.js @@ -1,4 +1,4 @@ -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); f.execs("rm -rf ~/deploy/server"); f.execs("mkdir ~/deploy/server"); f.execs("cp -r ~/thegame/node/* ~/deploy/server"); diff --git a/scripts/process_gallery.js b/scripts/process_gallery.js index 15de243..56c6520 100644 --- a/scripts/process_gallery.js +++ b/scripts/process_gallery.js @@ -1,5 +1,5 @@ var image_size=require('image-size'),fs=require('fs'); -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); var images=[]; [["/images/tiles/monsters/","monsters",".png"],["/images/tiles/characters/","characters",".png"],["/images/tiles/characters/tribes/","tribes",".png"],["/images/tiles/characters/npcs/","npcs",".png"],["/images/tiles/map/","map",".png"],["/images/tiles/examples/","examples",".png"],["/images/tiles/examples/","examples_gif",".gif"],["/images/sprites/animations/","animations",".png"],["/images/sprites/emblems/","emblems",".png"],["/images/sprites/weather/","weather",".png"],["/images/tiles/animations/","new animations",".png"]].forEach(function(fext){ diff --git a/scripts/run_a_command.js b/scripts/run_a_command.js index e6c528f..286f3c2 100644 --- a/scripts/run_a_command.js +++ b/scripts/run_a_command.js @@ -1,4 +1,4 @@ -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); require(process.env.HOME+"/thegame/scripts/data.js"); for(var id in machines) diff --git a/scripts/run_servers.js b/scripts/run_servers.js index c160982..c237a0b 100644 --- a/scripts/run_servers.js +++ b/scripts/run_servers.js @@ -1,4 +1,4 @@ -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); require(process.env.HOME+"/thegame/scripts/data.js"); servers.forEach(function(server){ diff --git a/scripts/test_iap.js b/scripts/test_iap.js index 1e20844..7a4cc7b 100644 --- a/scripts/test_iap.js +++ b/scripts/test_iap.js @@ -1,5 +1,5 @@ var secret="ac2b8964dffd4a8a961f427d1257d8f7"; -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); var iap = require('in-app-purchase'); var receipt_file="/Applications/Adventure Land.app/Contents/_MASReceipt/receipt"; //var receipt_file="/Users/kaan/Downloads/receipt"; diff --git a/scripts/update_machines.js b/scripts/update_machines.js index 07c2df7..a43024a 100644 --- a/scripts/update_machines.js +++ b/scripts/update_machines.js @@ -1,4 +1,4 @@ -var f=require(process.env.HOME+"/thegeobird/scripts/functions.js"); +var path=require("path"),f=require(path.resolve(__dirname, "functions.js")); require(process.env.HOME+"/thegame/scripts/data.js"); f.execso("node ~/gscripts/prepare_server.js;");