#93 - Option de controle des bruitages

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

View File

@ -9,6 +9,7 @@ export class RdDAudio {
/* -------------------------------------------- */ /* -------------------------------------------- */
static PlayContextAudio(context) { static PlayContextAudio(context) {
if (game.settings.get("foundryvtt-reve-de-dragon", "activer-sons-audio") ) {
let audioData = context2file[context]; let audioData = context2file[context];
if ( audioData ) { if ( audioData ) {
let audioPath = "systems/foundryvtt-reve-de-dragon/sounds/" + audioData.file; let audioPath = "systems/foundryvtt-reve-de-dragon/sounds/" + audioData.file;
@ -17,3 +18,4 @@ export class RdDAudio {
} }
} }
} }
}

View File

@ -171,8 +171,15 @@ Hooks.once("init", async function() {
default: true, default: true,
type: Boolean 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 // Set an initiative formula for the system

View File

@ -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 }, 30: { poids: "901-1000", plusdom:+9, sconst: 10, sust: 15 },
31: { poids: "1001-1500", plusdom:+10, sconst: 10, sust: 16 }, 31: { poids: "1001-1500", plusdom:+10, sconst: 10, sust: 16 },
32: { poids: "1501-2000", plusdom:+11, sconst: 10, sust: 17 } 32: { poids: "1501-2000", plusdom:+11, sconst: 10, sust: 17 }
} };
/* -------------------------------------------- */ /* -------------------------------------------- */
function _buildAllSegmentsFatigue(max) { function _buildAllSegmentsFatigue(max) {