Skip to content

Commit

Permalink
Fix templates for actual use
Browse files Browse the repository at this point in the history
Not the greatest fix, but it works
  • Loading branch information
LordRalex committed Jan 5, 2024
1 parent a093f9f commit 73441af
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 30 deletions.
82 changes: 63 additions & 19 deletions terraria-tmodloader/terraria-tmodloader.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,6 @@
"required": true,
"userEdit": true
},
"size": {
"type": "string",
"value": "3",
"display": "World-Size",
"desc": "This can not be changed after the world was generated - World Size (1-3 - 3 is biggest)",
"required": true,
"userEdit": true
},
"sl": {
"type": "string",
"value": "1",
Expand All @@ -208,7 +200,7 @@
},
"steam": {
"type": "string",
"value": "-steam",
"value": "",
"display": "Steam",
"desc": "Enables Steam Support",
"required": false,
Expand Down Expand Up @@ -247,31 +239,83 @@
"desc": "Name of the world folder",
"required": true,
"userEdit": true
},
"arch": {
"type": "option",
"value": "x64",
"display": "Architecture",
"desc": "Architecture your machine",
"required": true,
"userEdit": false,
"options": [
{
"value": "arm",
"display": "arm"
},
{
"value": "arm64",
"display": "arm64"
},
{
"value": "x64",
"display": "amd64"
}
]
},
"dotnetversion": {
"type": "string",
"value": "6.0.14",
"display": ".NET Runtime Version",
"desc": ".NET Runtime Version",
"required": true,
"userEdit": false
},
"size": {
"type": "option",
"value": "3",
"display": "World Size",
"desc": "World Size to create",
"required": true,
"userEdit": false,
"options": [
{
"value": "1",
"display": "Small"
},
{
"value": "2",
"display": "Medium"
},
{
"value": "3",
"display": "Large"
}
]
}
},
"install": [
{
"type": "download",
"files": [
"https://github.com/tModLoader/tModLoader/releases/download/${tversion}/tModLoader.zip"
"https://github.com/tModLoader/tModLoader/releases/download/${tversion}/tModLoader.zip",
"https://dotnetcli.azureedge.net/dotnet/Runtime/${dotnetversion}/dotnet-runtime-${dotnetversion}-linux-${arch}.tar.gz"
]
},
{
"type": "command",
"commands": [
"rm -rf ./server",
"mkdir ./server",
"unzip tModLoader.zip -d ./server",
"chmod +x ./server/tModLoaderServer",
"chmod +x ./server/tModLoaderServer.bin.x86",
"chmod +x ./server/tModLoaderServer.bin.x86_64",
"mkdir -p ./${wp}",
"rm tModLoader.Linux.v${tversion}.tar.gz"
"rm -rf dotnet",
"mkdir -p dotnet",
"tar -xzf dotnet-runtime-${dotnetversion}-linux-${arch}.tar.gz -C dotnet",
"rm -rf dotnet-runtime-linux-${arch}.tar.gz",
"unzip tModLoader.zip -d .",
"rm tModLoader.zip",
"mkdir -p ./${wp}"
]
}
],
"run": {
"command": "./server/tModLoaderServer -ip ${ip} ${disableannouncementbox} -announcementboxrange ${abr} -config ../serverconfig.txt",
"command": "dotnet/dotnet tModLoader.dll -server ${steam} -ip ${ip} ${disableannouncementbox} -announcementboxrange ${abr} -config ./serverconfig.txt -autocreate ${size}",
"stop": "exit",
"pre": [
{
Expand Down
14 changes: 3 additions & 11 deletions terraria-tshock/terraria-tshock.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dotnetversion": {
"type": "string",
"value": "6.0.10",
"value": "6.0.14",
"display": ".NET Runtime Version",
"desc": ".NET Runtime Version",
"required": true,
Expand Down Expand Up @@ -82,14 +82,6 @@
"required": true,
"userEdit": false
},
"wpath": {
"type": "string",
"value": "worlds",
"display": "Worlds Path",
"desc": "Name of the worlds folder",
"required": true,
"userEdit": false
},
"wsize": {
"type": "option",
"value": "3",
Expand Down Expand Up @@ -126,7 +118,7 @@
"commands": [
"unzip TShock-${tshockversion}-for-Terraria-${version}-linux-${arch}-Release.zip",
"tar xf TShock-Beta-linux-${arch}-Release.tar",
"mkdir ${wpath}",
"mkdir worlds",
"mkdir dotnet",
"tar xzf dotnet-runtime-${dotnetversion}-linux-${arch}.tar.gz -C dotnet",
"rm -rf TShock-${tshockversion}-for-Terraria-${version}-linux-${arch}-Release.zip",
Expand All @@ -136,7 +128,7 @@
}
],
"run": {
"command": "./TShock.Server -ip ${ip} -port ${port} -worldselectpath ${wpath} ${secure} -autocreate ${wsize}",
"command": "./TShock.Server -ip ${ip} -port ${port} -world ${rootDir}/worlds/world.wld -autocreate ${wsize} ${secure} --stats-optout",
"stop": "exit",
"environmentVars": {
"DOTNET_ROOT": "./dotnet"
Expand Down

0 comments on commit 73441af

Please sign in to comment.