We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 647fd60 + d7408f4 commit 14c0fd0Copy full SHA for 14c0fd0
1 file changed
TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs
@@ -202,7 +202,15 @@ internal static void HandleCommandLine(string[] parms)
202
}
203
case "-world":
204
{
205
- game.SetWorld(arg.Value, false);
+ if (File.Exists(arg.Value))
206
+ {
207
+ game.SetWorld(arg.Value, false);
208
+ }
209
+ else
210
211
+ Main.autoGenFileLocation = arg.Value;
212
+ Main.ActiveWorldFileData = new Terraria.IO.WorldFileData(arg.Value, false);
213
214
215
var full_path = Path.GetFullPath(arg.Value);
216
Main.WorldPath = Path.GetDirectoryName(full_path);
0 commit comments