Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fjfnaranjo opened this issue May 25, 2020 · 4 comments
Closed

Comments

@fjfnaranjo
Copy link

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 7ad46ab. 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: 7ad46ab

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
Copy link
Member

QuiCM commented May 25, 2020

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
Copy link
Author

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

-worldspath has the following advantages:

  • Is a different name without being too different.
  • Matches the original Terraria "Worlds" folder plural form.
  • Reduces ambiguity with the -world argument, because the last is refers to "one" world instead of "more than one" worlds.

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

hakusaro added a commit that referenced this issue May 25, 2020
This reverts commit 7ad46ab. This
reintroduces the worldpath argument as per request from #1914, but at a
different name. This is because users have configurations like this,
which no longer work:

-world + -worldpath = crash

If you want to use -worldselectionpath to specify a world, you should be
able to use -worldname, but don't use -world unless you specify an
absolute path to a world.

No matter how we solve this we get a support headache (-worldpath +
-world = crash). This temporary stopgap should work to help address
issue #1914 until we can figure out a final solution. Since users are
impacted by this change, temporarily adding this back is the best move.

To be 100% clear, though:

-world + -worldselectpath without specifying an absolute path will
result in a crash that is unhelpful. Please don't do that.
@QuiCM
Copy link
Member

QuiCM commented May 26, 2020

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

@QuiCM QuiCM closed this as completed May 26, 2020
@kyleshrader
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants