supertux
supertux copied to clipboard
Editor: --edit-level now also takes an absolute path
Load levels and worldmaps from the filesystem instead of using a PHYSFS local reference.
Fixes #1819
Please test this!
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.
Still need to fix the shadowing issue.
@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?
@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.
Better late than never :^)
What paths should actually be affected by this?