Utilisation de constant pour le systeme

This commit is contained in:
Vincent Vandemeulebrouck
2021-11-11 02:43:38 +01:00
parent 79a7ad8b8c
commit 31d1d352f2
9 changed files with 54 additions and 44 deletions

View File

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