supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Editor: --edit-level now also takes an absolute path

Open tobbi opened this issue 4 years ago • 6 comments

Load levels and worldmaps from the filesystem instead of using a PHYSFS local reference.

Fixes #1819

Please test this!

tobbi avatar Oct 05 '21 23:10 tobbi

Tested; works as described.

I'd recommend it takes only a relative path as argument, to avoid name clashes - if someone wants to test a few levels in a folder and a path for a level happens to clash with one in the data folder, the behavior might seem weird for someone who doesn't read the docs regularly. Giving priority to relative paths would be better, but it could still grab paths that don't exist.

Was there a particular reason to make it take a path starting from the data directory in the first place? As a CLI user, I find it more intuitive to enter either an absolute path or a relative path from the current directory. Also, paths from the data directory don't support autocomplete.

Semphriss avatar Oct 06 '21 01:10 Semphriss

Still need to fix the shadowing issue.

tobbi avatar Oct 06 '21 06:10 tobbi

@Semphriss Can you please specify in what order we should check paths?

My suggestion would be: a) Absolute paths in the user's filesystem b) Relative paths in the user's filesystem c) PhysFS mounts

You concur?

tobbi avatar Oct 16 '21 20:10 tobbi

@Semphriss Can you please specify in what order we should check paths?

My suggestion would be: a) Absolute paths in the user's filesystem b) Relative paths in the user's filesystem c) PhysFS mounts

You concur?

I'd propose only absolute/relative from CWD; testing multiple paths might be confusing for users when paths clash. If we really need to have both options available, it would be wise to let the user specify their preference with a CLI flag, to avoid making certain level files unplayable under certain circumstances.

Semphriss avatar Nov 05 '21 20:11 Semphriss

Better late than never :^)

mrkubax10 avatar Aug 30 '23 13:08 mrkubax10

What paths should actually be affected by this?

tobbi avatar Mar 29 '24 16:03 tobbi