forked from public/foundryvtt-reve-de-dragon
Preparation callbacks pour nouveaux Rolls
This commit is contained in:
@ -259,7 +259,7 @@ export class RdDRoll extends Dialog {
|
||||
this.updateRollResult(html);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
close() {
|
||||
if (this.rollData.canClose) {
|
||||
@ -269,15 +269,12 @@ export class RdDRoll extends Dialog {
|
||||
}
|
||||
|
||||
async onAction(action) {
|
||||
this.rollData.forceDiceResult = Number.parseInt(this.html.find("[name='force-dice-result']").val()) ?? -1;
|
||||
await RdDResolutionTable.rollData(this.rollData);
|
||||
console.log("RdDRoll -=>", this.rollData, this.rollData.rolled);
|
||||
if (action.callbacks)
|
||||
for (let callback of action.callbacks) {
|
||||
if (callback.condition == undefined || callback.condition(this.rollData)) {
|
||||
await callback.action(this.rollData);
|
||||
}
|
||||
}
|
||||
this.rollData.forceDiceResult = Number.parseInt(this.html.find("[name='force-dice-result']").val()) ?? -1
|
||||
await RdDResolutionTable.rollData(this.rollData)
|
||||
|
||||
for (let callback of action.callbacks) {
|
||||
await callback.action(this.rollData)
|
||||
}
|
||||
}
|
||||
|
||||
async setSelectedSort(sort) {
|
||||
|
Reference in New Issue
Block a user