Ajout Race et fix Dice-so-nice #481

Merged
vincent.vandeme merged 1 commits from v1.4-race into v1.4 2021-06-02 17:08:14 +02:00
2 changed files with 31 additions and 22 deletions

View File

@ -123,6 +123,13 @@ export class RdDDice {
CONFIG.Dice.terms[DeDraconique.DENOMINATION] = DeDraconique;
CONFIG.Dice.terms[DeHeure.DENOMINATION] = DeHeure;
}
static onReady() {
if (game.modules.get("dice-so-nice")?.active) {
if (game.settings.get("core", "noCanvas")) {
ui.notifications.warn("Dice So Nice! n'affichera pas de dés car vous avez coché l'option de Foundry 'Scène de jeu désactivé' 'Disable Game Canvas' ");
}
}
}
static async roll(formula, options = { showDice: false, rollMode: undefined }) {
const roll = new Roll(formula);
@ -153,7 +160,7 @@ export class RdDDice {
}
/* -------------------------------------------- */
static async show(roll, rollMode = undefined) {
static async show(roll, rollMode) {
if (roll.showDice || game.settings.get(SYSTEM_RDD, "dice-so-nice") == true) {
await this.showDiceSoNice(roll, rollMode);
}
@ -161,8 +168,9 @@ export class RdDDice {
}
/* -------------------------------------------- */
static async showDiceSoNice(roll, rollMode = undefined) {
if (game.modules.get("dice-so-nice") && game.modules.get("dice-so-nice").active) {
static async showDiceSoNice(roll, rollMode) {
if (game.modules.get("dice-so-nice")?.active) {
if (game.dice3d) {
let whisper = null;
let blind = false;
rollMode = rollMode ?? game.settings.get("core", "rollMode");
@ -183,3 +191,4 @@ export class RdDDice {
}
}
}
}

View File

@ -214,7 +214,7 @@ Hooks.once("ready", function () {
StatusEffects.onReady();
RdDHerbes.initializeHerbes();
RdDDice.onReady();
/* -------------------------------------------- */
/* Affiche/Init le calendrier */
let calendrier = new RdDCalendrier();