From f8b306333958c4ee580bdd66d3d64e07f8440a77 Mon Sep 17 00:00:00 2001 From: Joshua Taylor Date: Fri, 17 Nov 2023 20:35:55 -0600 Subject: [PATCH] Migrate tshock to v3 for testing purposes --- terraria-tshock/terraria-tshock.json | 127 +++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 terraria-tshock/terraria-tshock.json diff --git a/terraria-tshock/terraria-tshock.json b/terraria-tshock/terraria-tshock.json new file mode 100644 index 00000000..d0ff4ad6 --- /dev/null +++ b/terraria-tshock/terraria-tshock.json @@ -0,0 +1,127 @@ +{ + "name": "terraria-tshock", + "display": "Terraria - TShock", + "type": "terraria", + "data": { + "ip": { + "type": "string", + "desc": "Sets the IP address for the server to listen on - 0.0.0.0 means every possible IP", + "display": "IP", + "required": true, + "value": "0.0.0.0" + }, + "port": { + "type": "integer", + "desc": "What port to bind the server to", + "display": "Port", + "required": true, + "value": "7777" + }, + "tshockversion": { + "type": "string", + "desc": "TShock Version", + "display": "TShock Version (Set this to the latest server version - see here https://github.com/Pryaxis/TShock/releases/latest)", + "required": true, + "value": "5.2" + }, + "version": { + "type": "string", + "desc": "Server Version (Set this to the latest server version)", + "display": "Server Version", + "required": true, + "value": "1.4.4.9" + }, + "dotnetversion": { + "type": "string", + "desc": ".NET Runtime Version", + "display": ".NET Runtime Version", + "required": true, + "value": "6.0.10" + }, + "wpath": { + "type": "string", + "desc": "Name of the worlds folder", + "display": "Worlds Path", + "required": true, + "value": "worlds" + }, + "secure": { + "desc": "Enable cheat protection ?", + "display": "secure", + "required": true, + "value": "", + "type": "option", + "options": [ + { + "value": "-secure", + "display": "Yes" + }, + { + "value": "", + "display": "No" + } + ] + }, + "arch": { + "value": "x64", + "required": true, + "desc": "Architecture your machine", + "display": "Architecture", + "internal": false, + "type": "option", + "options": [ + { + "value": "arm", + "display": "arm" + }, + { + "value": "arm64", + "display": "arm64" + }, + { + "value": "x64", + "display": "amd64" + } + ] + } + }, + "install": [ + { + "type": "download", + "files": [ + "https://github.com/Pryaxis/TShock/releases/download/v${tshockversion}/TShock-${tshockversion}-for-Terraria-${version}-linux-${arch}-Release.zip", + "https://dotnetcli.azureedge.net/dotnet/Runtime/${dotnetversion}/dotnet-runtime-${dotnetversion}-linux-${arch}.tar.gz" + ] + }, + { + "type": "command", + "commands": [ + "unzip TShock-${tshockversion}-for-Terraria-${version}-linux-${arch}-Release.zip", + "tar xf TShock-Beta-linux-${arch}-Release.tar", + "mkdir ${wpath}", + "mkdir dotnet", + "tar xzf dotnet-runtime-${dotnetversion}-linux-${arch}.tar.gz -C dotnet", + "rm -rf TShock-${tshockversion}-for-Terraria-${version}-linux-${arch}-Release.zip", + "rm -rf TShock-Beta-linux-${arch}-Release.tar", + "rm -rf dotnet-runtime-linux-${arch}.tar.gz" + ] + } + ], + "run": { + "command": "./TShock.Server -ip ${ip} -port ${port} -worldselectpath ${wpath} ${secure}", + "stop": "exit", + "environmentVars": { + "DOTNET_ROOT": "${rootDir}/dotnet" + } + }, + + "environment": { + "type": "tty" + }, + "requirements": { + "os": "linux", + "binaries": [ + "unzip" + ] + } + } \ No newline at end of file