Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

Consider reverting the change in program arguments to remove -worldpath #1914

Closed fjfnaranjo closed 4 years ago

fjfnaranjo commented 4 years ago

Is your feature request related to a problem? Please describe.

I was able to pass the -worldpath argument value from TShock to the upstream Terraria server but now I cannot because of the commit https://github.com/Pryaxis/TShock/commit/7ad46abced17113ca4338598c73c172828e43355. I think this posibility served many purposes to me and other users. The main one being able to show a particular list of worlds in the "world selection" CLI interface.

Describe the solution you'd like

I will like this argument to be restored. I don't want to lose the ability to use -world nor I think you shouldn't use it when you already now the final path. I will like just to pass the value to the upstream Terraria server to be able to list the world in a particular directory in the "world selection" CLI interface.

Describe alternatives you've considered

I already implemented an alternative to my case using a symbolic link to the default Linux path ~/.local/share/Terraria/Worlds. As you can see in: https://github.com/fjfnaranjo/tshock-docker/blob/master/Dockerfile#L13-L14

Additional context

Relevant commit: https://github.com/Pryaxis/TShock/commit/7ad46abced17113ca4338598c73c172828e43355

Disclaimer: I'm the developer for the Docker image: https://hub.docker.com/r/fjfnaranjo/tshock/ . But I think this may serve well other users. The code for the Docker image is in: https://github.com/fjfnaranjo/tshock-docker . A post in the forums exists talking about this image here: https://tshock.co/xf/index.php?threads/i-just-dockerized-tshock.5198/ .

Kind regards.

QuiCM commented 4 years ago

This seems like a valid use-case. To implement something like this I think we need to sort out how to prevent the combination of -worldpath and -world from crashing the server. Now that -world requires an absolute path, the combination of -worldpath and -world will result in confusion. Perhaps a rename of -worldpath would help

Suggestions welcome

fjfnaranjo commented 4 years ago

If you go with the rename, I think you can get a lot from just the pluralization.

-worldspath has the following advantages:

But I will also take into consideration just emulating the behavior of the upstream server. Even crashing on launch if the server does.

QuiCM commented 4 years ago

3874c04 adds the -worldselectpath which is functionally the same as -worldpath

kyleshrader commented 4 years ago

Please consider updating -worldpath to -worldselectpath at https://tshock.readme.io/docs/command-line-parameters under the TShock Command Line section.