#93 - Option de controle des bruitages

This commit is contained in:
2021-01-12 20:58:30 +01:00
parent f3ed299ac9
commit ad00a3f700
3 changed files with 17 additions and 8 deletions

View File

@ -9,11 +9,13 @@ export class RdDAudio {
/* -------------------------------------------- */
static PlayContextAudio(context) {
let audioData = context2file[context];
if ( audioData ) {
let audioPath = "systems/foundryvtt-reve-de-dragon/sounds/" + audioData.file;
console.log(`wfrp4e | Playing Sound: ${audioPath}`)
AudioHelper.play({ src: audioPath }, audioData.isGlobal);
if (game.settings.get("foundryvtt-reve-de-dragon", "activer-sons-audio") ) {
let audioData = context2file[context];
if ( audioData ) {
let audioPath = "systems/foundryvtt-reve-de-dragon/sounds/" + audioData.file;
console.log(`wfrp4e | Playing Sound: ${audioPath}`)
AudioHelper.play({ src: audioPath }, audioData.isGlobal);
}
}
}
}