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

Make all file IO searchpath-agnostic #2

Open
ThisAMJ opened this issue Jul 6, 2023 · 0 comments
Open

Make all file IO searchpath-agnostic #2

ThisAMJ opened this issue Jul 6, 2023 · 0 comments

Comments

@ThisAMJ
Copy link
Member

ThisAMJ commented Jul 6, 2023

The Source Engine supports arbitrarily many "game paths" with sequential read priorities (i.e. read from first path, if non-existent read from next). A gripe I have with SAR is that certain files have to be in certain game directories e.g. tas folder in Portal 2, crosshair in portal2, etc, making the use of these features rather unintuitive and opaque without a tutorial/wiki. So, I believe that in Wormhole, all file IO should be done through the API, with support for the use of any search path so that such confusion is avoided. I've started trying to do this on SAR's download_file branch, with pretty good results.

See also: SAR FileSystem::GetSearchPaths()

Alternatively, we could create a single centralized 'common dir' for all Wormhole files (~/.config/wormhole/? %appdata%\wormhole?) and read and write to there. The question is then of course how, and how much, do we move stuff from the game folder there?

e.g. loading wormhole from .vdf may work from 'common dir'? Begs the question of ease of installation

// wormhole.vdf or smn
"Plugin"
{
    "file" "<path>/<to>/wormhole"
}

Just spitballin

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

No branches or pull requests

1 participant