-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
packRegistry.js
37 lines (32 loc) · 1.48 KB
/
packRegistry.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const moduleName = 'soundfxlibrary',
soundPacksSounboard = ['Combat', 'Creatures', 'Misc', 'Nature', 'Tavern', 'Town'],
soundPacksMoulinette = ['Combat/Loops', 'Combat/Single', 'Creatures/Animals', 'Creatures/Monsters', 'Misc/Loops', 'Misc/Single', 'Nature/Loops', 'Nature/Single', 'Tavern/Loops', 'Tavern/Single', 'Town/Loops', 'Town/Single'],
moduleLink = 'https://github.com/CDeenen/SoundFxLibrary';
/* Soundboard by Blitz */
Hooks.once('SBPackageManagerReady', () => {
soundPacksSounboard.forEach((pack) => {
SoundBoard.packageManager.addSoundPack(game.i18n.localize(`SOUNDFXLIBRARY.${pack}.title`), `modules/${moduleName}/${pack}`, moduleName, {
description: game.i18n.localize(`SOUNDFXLIBRARY.${pack}.description`),
licenses: [{
licenseUrl: 'https://raw.githubusercontent.com/CDeenen/SoundFxLibrary/master/Attribution.xlsx',
licenseType: 'Multiple',
licenseDescription: game.i18n.localize('SOUNDFXLIBRARY.licenseDescription')
}],
author: 'CDeenen',
link: moduleLink
});
});
});
/* Moulinette */
Hooks.once('ready', () => {
if (game.moulinette) {
const moulinetteSources = soundPacksMoulinette.map((pack) => ({
type: 'sounds',
publisher: 'CDeenen',
pack,
source: 'data',
path: `modules/${moduleName}/${pack}`,
}));
game.moulinette.sources.push(...moulinetteSources);
};
});