Sound system improvements

- Fix sound ACP uploads
- Display soundpack names with sound files
- Soundpacks can have sounds with identical names
- Link sounds during build step
- Generate map of sound name to file name during build step
- Change how soundpacks work. It's now done via a field in plugin.json
This commit is contained in:
Peter Jaszkowiak
2017-02-16 22:56:25 -07:00
parent fd88e9fdff
commit c75391f9f5
16 changed files with 337 additions and 264 deletions

View File

@@ -341,20 +341,8 @@ SocketModules.chats.getMessages = function (socket, data, callback) {
};
/* Sounds */
SocketModules.sounds.getSounds = function (socket, data, callback) {
// Read sounds from local directory
meta.sounds.getFiles(callback);
};
SocketModules.sounds.getMapping = function (socket, data, callback) {
meta.sounds.getMapping(socket.uid, callback);
};
SocketModules.sounds.getData = function (socket, data, callback) {
async.parallel({
mapping: async.apply(meta.sounds.getMapping, socket.uid),
files: async.apply(meta.sounds.getFiles)
}, callback);
SocketModules.sounds.getUserSoundMap = function getUserSoundMap(socket, data, callback) {
meta.sounds.getUserSoundMap(socket.uid, callback);
};
module.exports = SocketModules;