Skip to content

Make all file IO searchpath-agnostic #2

Description

@ThisAMJ

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions