Merge branch 'v1.4-race' into 'v1.4'
Ajout Race et fix Dice-so-nice See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!264
This commit is contained in:
commit
60a7b551af
@ -123,8 +123,15 @@ 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}) {
|
||||
static async roll(formula, options = { showDice: false, rollMode: undefined }) {
|
||||
const roll = new Roll(formula);
|
||||
await roll.evaluate({ async: true });
|
||||
if (options.showDice) {
|
||||
@ -141,7 +148,7 @@ export class RdDDice {
|
||||
|
||||
static async rollOneOf(array) {
|
||||
const roll = await RdDDice.rollTotal(`1d${array.length}`);
|
||||
return array[roll-1];
|
||||
return array[roll - 1];
|
||||
}
|
||||
|
||||
static diceSoNiceReady(dice3d) {
|
||||
@ -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,25 +168,27 @@ export class RdDDice {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async showDiceSoNice(roll, rollMode = undefined) {
|
||||
if (game.modules.get("dice-so-nice") && game.modules.get("dice-so-nice").active) {
|
||||
let whisper = null;
|
||||
let blind = false;
|
||||
rollMode = rollMode ?? game.settings.get("core", "rollMode");
|
||||
switch (rollMode) {
|
||||
case "blindroll": //GM only
|
||||
blind = true;
|
||||
case "gmroll": //GM + rolling player
|
||||
whisper = ChatUtility.getUsers(user => user.isGM);
|
||||
break;
|
||||
case "roll": //everybody
|
||||
whisper = ChatUtility.getUsers(user => user.active);
|
||||
break;
|
||||
case "selfroll":
|
||||
whisper = [game.user.id];
|
||||
break;
|
||||
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");
|
||||
switch (rollMode) {
|
||||
case "blindroll": //GM only
|
||||
blind = true;
|
||||
case "gmroll": //GM + rolling player
|
||||
whisper = ChatUtility.getUsers(user => user.isGM);
|
||||
break;
|
||||
case "roll": //everybody
|
||||
whisper = ChatUtility.getUsers(user => user.active);
|
||||
break;
|
||||
case "selfroll":
|
||||
whisper = [game.user.id];
|
||||
break;
|
||||
}
|
||||
await game.dice3d.showForRoll(roll, game.user, true, whisper, blind);
|
||||
}
|
||||
await game.dice3d.showForRoll(roll, game.user, true, whisper, blind);
|
||||
}
|
||||
}
|
||||
}
|
@ -214,7 +214,7 @@ Hooks.once("ready", function () {
|
||||
|
||||
StatusEffects.onReady();
|
||||
RdDHerbes.initializeHerbes();
|
||||
|
||||
RdDDice.onReady();
|
||||
/* -------------------------------------------- */
|
||||
/* Affiche/Init le calendrier */
|
||||
let calendrier = new RdDCalendrier();
|
||||
|
File diff suppressed because one or more lines are too long
@ -17,6 +17,7 @@
|
||||
"biographie": "Histoire personnelle...",
|
||||
"notes": "Notes",
|
||||
"notesmj": "Notes du MJ",
|
||||
"race": "Humain",
|
||||
"yeux": "",
|
||||
"cheveux": "",
|
||||
"poids": "",
|
||||
|
@ -660,56 +660,50 @@
|
||||
<article class="flexrow">
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Sexe :
|
||||
<input class="description-value flexrow" type="text" name="data.sexe" value="{{data.sexe}}" data-dtype="String"/>
|
||||
</label>
|
||||
<label for="data.race">Race :</label>
|
||||
<input class="flex-grow" type="text" name="data.race" value="{{data.race}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Poids :
|
||||
<input class="description-value flexrow" type="text" name="data.poids" value="{{data.poids}}" data-dtype="String"/>
|
||||
</label>
|
||||
<label for="data.sexe">Sexe :</label>
|
||||
<input class="flex-grow" type="text" name="data.sexe" value="{{data.sexe}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Taille :
|
||||
<input class="description-value flexrow" type="text" name="data.taille" value="{{data.taille}}" data-dtype="String"/>
|
||||
</label>
|
||||
<label for="data.age">Age :</label>
|
||||
<input class="flex-grow" type="text" name="data.age" value="{{data.age}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Cheveux :
|
||||
<input class="description-value flexrow" type="text" name="data.cheveux" value="{{data.cheveux}}" data-dtype="String"/>
|
||||
</label>
|
||||
<label for="data.poids">Poids :</label>
|
||||
<input class="flex-grow" type="text" name="data.poids" value="{{data.poids}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Yeux :
|
||||
<input class="description-value flexrow" type="text" name="data.yeux" value="{{data.yeux}}" data-dtype="String"/>
|
||||
</label>
|
||||
<label for="data.taille">Taille :</label>
|
||||
<input class="flex-grow" type="text" name="data.taille" value="{{data.taille}}" data-dtype="String"/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Age :
|
||||
<input class="description-value flexrow" type="text" name="data.age" value="{{data.age}}" data-dtype="String"/>
|
||||
</label>
|
||||
<label for="data.main">Main directrice :</label>
|
||||
<input type="text" name="data.main" value="{{data.main}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Heure de naissance :
|
||||
<select class="description-value flexrow" type="text" name="data.heure" value="{{data.heure}}" data-dtype="String">
|
||||
{{#select data.heure}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</label>
|
||||
<label for="data.heure">Heure de naissance :</label>
|
||||
<select type="text" name="data.heure" value="{{data.heure}}" data-dtype="String">
|
||||
{{#select data.heure}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Beauté :
|
||||
<label class="description-label competence-label">{{data.beaute}}
|
||||
</label>
|
||||
</label>
|
||||
<label>Beauté :</label>
|
||||
<input type="text" value="{{data.beaute}}" data-dtype="String" disabled/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Main directrice :
|
||||
<input class="description-value flexrow" type="text" name="data.main" value="{{data.main}}" data-dtype="String"/>
|
||||
</label>
|
||||
<label for="data.cheveux">Cheveux :</label>
|
||||
<input class="flex-grow" type="text" name="data.cheveux" value="{{data.cheveux}}" data-dtype="String"/>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label for="data.yeux">Yeux :</label>
|
||||
<input class="flex-grow" type="text" name="data.yeux" value="{{data.yeux}}" data-dtype="String"/>
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
|
Loading…
Reference in New Issue
Block a user