From 91e5a36ca6a5a7202332d5224a2ed1407d841f70 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Thu, 23 Feb 2023 19:26:34 +0100 Subject: [PATCH] minetest: update 2 --- game_eggs/minetest/egg-minetest.json | 60 +++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/game_eggs/minetest/egg-minetest.json b/game_eggs/minetest/egg-minetest.json index d047cbbc..9e2a1eb8 100644 --- a/game_eggs/minetest/egg-minetest.json +++ b/game_eggs/minetest/egg-minetest.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2023-02-16T16:17:26+01:00", + "exported_at": "2023-02-23T19:25:23+01:00", "name": "Minetest", "author": "support@pterodactyl.io", "description": "An open source voxel game engine. Play one of our many games, mod a game to your liking, make your own game, or play on a multiplayer server.", @@ -13,16 +13,16 @@ "ghcr.io\/parkervcp\/games:minetest": "ghcr.io\/parkervcp\/games:minetest" }, "file_denylist": [], - "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/.minetest\/{{WORLD_NAME}} --terminal --config \/home\/container\/minetest.conf --logfile \/home\/container\/server.log", + "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/worlds\/{{WORLD_NAME}} --terminal --config \/home\/container\/minetest.conf --logfile \/home\/container\/server.log", "config": { - "files": "{\r\n \"minetest.conf\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" name = \": \" name = {{server.build.env.SERVER_ADMIN_NAME}}\",\r\n \" server_name = \": \" server_name = {{server.build.env.SERVER_NAME}}\",\r\n \" server_description = \": \" server_description = {{server.build.env.SERVER_DESC}}\",\r\n \" server_address = \": \" server_address = {{server.build.env.SERVER_DOMAIN}}\",\r\n \" server_url = \": \" server_url = {{server.build.env.SERVER_URL}}\",\r\n \" server_announce = \": \" server_announce = {{server.build.env.SERVER_ANNOUNCE}}\",\r\n \" serverlist_url = \": \" serverlist_url = {{server.build.env.SERVER_LIST_URL}}\",\r\n \" motd = \": \" motd = {{server.build.env.SERVER_MOTD}}\",\r\n \" max_users = \": \" max_users = {{server.build.env.SERVER_MAX_USERS}}\",\r\n \" bind_address = \": \" bind_address = 0.0.0.0\",\r\n \" default_password = \": \" default_password = {{server.build.env.SERVER_PASSWORD}}\"\r\n }\r\n }\r\n}", + "files": "{\r\n \"minetest.conf\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"name\": \"name = {{server.build.env.SERVER_ADMIN_NAME}}\",\r\n \"server_name\": \"server_name = {{server.build.env.SERVER_NAME}}\",\r\n \"server_description\": \"server_description = {{server.build.env.SERVER_DESC}}\",\r\n \"server_address\": \"server_address = {{server.build.env.SERVER_DOMAIN}}\",\r\n \"server_url\": \"server_url = {{server.build.env.SERVER_URL}}\",\r\n \"server_announce\": \"server_announce = {{server.build.env.SERVER_ANNOUNCE}}\",\r\n \"serverlist_url\": \"serverlist_url = {{server.build.env.SERVER_LIST_URL}}\",\r\n \"motd\": \"motd = {{server.build.env.SERVER_MOTD}}\",\r\n \"max_users\": \"max_users = {{server.build.env.SERVER_MAX_USERS}}\",\r\n \"bind_address\": \"bind_address = 0.0.0.0\",\r\n \"default_password\": \"default_password = {{server.build.env.SERVER_PASSWORD}}\",\r\n \"default_game\": \"default_game = {{server.build.env.DEFAULT_GAME}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \" Server for gameid\"\r\n}", "logs": "{}", - "stop": "\/shutdown" + "stop": "^^C" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \/mnt\/server\/server.log\r\nfi\r\n\r\nCONFIG_FILE=\/mnt\/server\/minetest.conf\r\nif [ -f \"$FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/minetest.conf https:\/\/pteropaste.com\/mwxco1\r\nfi\r\n\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", + "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit\r\n\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \"$LOG_FILE\"\r\nfi\r\n\r\nCONFIG_FILE=\/mnt\/server\/minetest.conf\r\nif [ -f \"$CONFIG_FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/minetest.conf.example https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/minetest.conf.example\r\n echo -e \"## Server settings generated by pterodactyl\\nname\\nserver_name\\nserver_description\\nserver_address\\nserver_url\\nserver_announce\\nserverlist_url\\nmotd\\nmax_users\\nbind_address\\ndefault_password\\ndefault_game\\n\\n## Custom server settings\\n\" >> \"$CONFIG_FILE\"\r\nfi\r\n\r\nGAMES_FOLDER=\/mnt\/server\/games\r\nif [ -d \"$GAMES_FOLDER\" ]; then\r\n echo \"GAMES folder already exists.\"\r\nelse \r\n echo \"GAMES folder does not exist. Making one...\"\r\n mkdir -p $GAMES_FOLDER\r\nfi\r\n\r\nMOD_FOLDER=\/mnt\/server\/mods\r\nif [ -d \"$MOD_FOLDER\" ]; then\r\n echo \"Mods folder already exists.\"\r\nelse \r\n echo \"Mods folder does not exist. Making one...\"\r\n mkdir -p $MOD_FOLDER\r\n curl -sSL -o \"$MOD_FOLDER\"\/mods_here.txt https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/mods\/mods_here.txt\r\nfi\r\n\r\nif [ \"$COMMUNITY_DOWNLOAD\" == \"1\" ]; then\r\n if [ -z \"$COMMUNITY_GAME_NAME\" ]\r\n then\r\n echo \"The COMMUNITY_GAME_NAME variable is required to download a community game\"\r\n exit\r\n fi\r\n if [ -z \"$COMMUNITY_GAME_AUTOR\" ]\r\n then\r\n echo \"The COMMUNITY_GAME_AUTOR variable is required to download a community game\"\r\n exit\r\n fi\r\n cd \/mnt\/server\/games\r\n D_URL=$(curl -s https:\/\/content.minetest.net\/packages\/$COMMUNITY_GAME_AUTOR\/$COMMUNITY_GAME_NAME\/ | grep -i download | grep packages | grep download | grep -o 'href=\".*\"' | cut -d \"=\" -f2- | egrep title= | awk -F' ' '{print $1}' | tr -d '\"')\r\n curl --progress-bar --verbose -sSL -o game.zip https:\/\/content.minetest.net\/$D_URL\r\n cd \/mnt\/server\/games\r\n unzip -o game.zip\r\n rm game.zip\r\nfi\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } @@ -137,6 +137,56 @@ "user_editable": true, "rules": "required|string|max:32", "field_type": "text" + }, + { + "name": "Game name", + "description": "Default game when creating a new world. Only change if you have already uploaded the game!", + "env_variable": "DEFAULT_GAME", + "default_value": "minetest", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:32", + "field_type": "text" + }, + { + "name": "Community download", + "description": "Download a community game.\r\nNeeds COMMUNITY_GAME_NAME and COMMUNITY_GAME_AUTOR", + "env_variable": "COMMUNITY_DOWNLOAD", + "default_value": "0", + "user_viewable": true, + "user_editable": true, + "rules": "required|boolean", + "field_type": "text" + }, + { + "name": "Community game name", + "description": "Case sensitive!\r\nExample: https:\/\/content.minetest.net\/packages\/Wuzzy\/mineclone2\/\r\nthen this should be mineclone2", + "env_variable": "COMMUNITY_GAME_NAME", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "nullable|string|max:64", + "field_type": "text" + }, + { + "name": "Community game author", + "description": "Case-sensitive!\r\nExample: https:\/\/content.minetest.net\/packages\/Wuzzy\/mineclone2\/\r\nthen this should be Wuzzy", + "env_variable": "COMMUNITY_GAME_AUTOR", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "nullable|string|max:64", + "field_type": "text" + }, + { + "name": "Game PATH", + "description": "", + "env_variable": "MINETEST_SUBGAME_PATH", + "default_value": "\/home\/container\/games", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:64", + "field_type": "text" } ] }