Can you add a support function that checks if a file is already in the cache?
It's very important for a way to package music files in ZIP-like add-ons. I have a solution to make music packs easily distributed through add-on packaging.
The current system:
- Server hosts copy music to Add-Ons/Music to install it
- Clients can't do anything except download music from the server
How it can be reimplemented:
An add-on, perhaps like Music_ThePack.zip, will run like a normal add-on. It includes all the music files in a seperate folder in the ZIP. The server.cs copies all of those files to the game's music folder. The client.cs checks all the files and adds them to the cache as long as they aren't already there.
What problems get solved / things get more convenient:
- Server hosts simply add the add-on to add-ons/ and it's loaded (but not removed when the music pack is deleted)
- Clients simply add the add-on like server hosts and therefore downloading music actually does something