#93 - Option de controle des bruitages
This commit is contained in:
parent
f3ed299ac9
commit
ad00a3f700
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,8 +171,15 @@ Hooks.once("init", async function() {
|
||||
default: true,
|
||||
type: Boolean
|
||||
});
|
||||
|
||||
//game.settings.get("<systemName>","<settingName>") to retrieve it and game.settings.set("<systemName>","<settingName>", <newValue>)
|
||||
/* -------------------------------------------- */
|
||||
game.settings.register("foundryvtt-reve-de-dragon", "activer-sons-audio", {
|
||||
name: "Activer les bruitages intégrés",
|
||||
hint: "Si activé, certaines actions en jeu déclenchent un son d'ambiance",
|
||||
scope: "world",
|
||||
config: true,
|
||||
default: true,
|
||||
type: Boolean
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
|
@ -60,7 +60,7 @@ const taille2derivee = { 1: { poids: "moins de 1kg", plusdom:-5, sconst: 0.5, s
|
||||
30: { poids: "901-1000", plusdom:+9, sconst: 10, sust: 15 },
|
||||
31: { poids: "1001-1500", plusdom:+10, sconst: 10, sust: 16 },
|
||||
32: { poids: "1501-2000", plusdom:+11, sconst: 10, sust: 17 }
|
||||
}
|
||||
};
|
||||
|
||||
/* -------------------------------------------- */
|
||||
function _buildAllSegmentsFatigue(max) {
|
||||
|
Loading…
Reference in New Issue
Block a user