datdamnzotz / FoundryVTT-Game-Audio-Bundle-1

Foundry VTT - Game Audio Bundle 1
17 stars 2 forks source link

Integrate with Moulinette #4

Closed ghost91- closed 1 year ago

ghost91- commented 3 years ago

Moulinette is a module that can be used to manage all kinds of different assets, including audio. It provides a very convenient interface to access files, drag them onto the scene, and create playlists from audio files. Moulinette provides a very easy way for content modules to integrate with it and it would be great if the Game Audio Bundles could do so.

The documentation about how this integration works can be found here: https://github.com/SvenWerlen/moulinette-core/blob/main/docs/README.md#how-to-index-assets-provided-by-other-modules

However, it is extremely easy, all that would be needed is to include a small JavaScript file in your module:

Hooks.once("ready", async function () {
  if(game.moulinette) {
    game.moulinette.sources.push({ type: "sounds", publisher: "Sonniss", pack: "FoundryVTT Game Audio Bundle 1", source: "data", path: "modules/gAudioBundle-1/src" })
  }
});

And of course you would need to include this JavaScript file in your module.json.

Adjust accordingly for the other bundles.

I really hope you consider adding this as it would be a tremendous help for users of both Moulinette and the Game Audio Bundles. I would also be willing to simply create a Pull Request to add this if it sounds like a good idea to you in general :)

datdamnzotz commented 3 years ago

wholly crap that's a cool module. I'm in the middle of a move so a pull request would be most awesome! Don't know if you saw it but there is game-icons.net as well https://github.com/datdamnzotz/icons

ghost91- commented 3 years ago

They already have an integration for game-icons.net which can create instances of the icons dynamically (by specifying foreground and background color): https://github.com/SvenWerlen/moulinette-core#forge-game So I think there is less of a need for that in particular. But on the other hand, it also doesn't hurt. I'll create PRs for all the Game Audio Bundle modules and your game-icons module, too :)