Facepunch / garrysmod-requests

Feature requests for Garry's Mod
83 stars 24 forks source link

Expose information about file locations #822

Open Ruuttu opened 8 years ago

Ruuttu commented 8 years ago

Prompted by this issue: https://github.com/wiremod/wire/issues/1220

It's possible, for example, to get a list of available sounds, but there's no way to know which game the sound is from.

This should probably be a generic file function that accepts a string like "garrysmod/balloon_pop_cute.wav" and returns a longer path, such as "SteamApps/common/GarrysMod/garrysmod/balloon_pop_cute.wav" (or something.vpk), or even "C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\balloon_pop_cute.wav".

Alternatively the function would only identify what game the resource is from in a human or machine-readable way.

robotboy655 commented 8 years ago

Scan each mounted game or whatever with file.Find and build a list.

Ruuttu commented 8 years ago

That might be a possible workaround, yes.