Merge branch 'v1.4' into 'dev_0.8'

# Conflicts:
#   module/actor-sheet.js
#   system.json
#   templates/actor-sheet.html
This commit is contained in:
2021-03-02 22:44:57 +00:00
36 changed files with 933 additions and 590 deletions

View File

@@ -18,6 +18,12 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData, dialogConfig, ...actions) {
if (actor.isRollWindowsOpened() ) {
ui.notifications.warn("Vous avez déja une fenêtre de Test ouverte, il faut la fermer avant d'en ouvrir une autre.")
return;
}
actor.setRollWindowsOpened(true);
RdDRoll._ensureCorrectActions(actions);
RdDRoll._setDefaultOptions(actor, rollData);
@@ -102,6 +108,7 @@ export class RdDRoll extends Dialog {
close() {
if (this.rollData.canClose) {
this.actor.setRollWindowsOpened(false);
return super.close();
}
ui.notifications.info("Vous devez faire ce jet de dés!");
@@ -112,7 +119,8 @@ export class RdDRoll extends Dialog {
async onAction(action, html) {
await RdDResolutionTable.rollData(this.rollData);
console.log("RdDRoll -=>", this.rollData, this.rollData.rolled);
this.actor.setRollWindowsOpened(false);
if (action.callbacks)
for (let callback of action.callbacks) {
if (callback.condition == undefined || callback.condition(this.rollData)) {