forked from public/foundryvtt-reve-de-dragon
Corrections premiers retours
This commit is contained in:
@@ -48,7 +48,7 @@ import { ActorImpacts } from "../technical/actor-impacts.mjs";
|
||||
|
||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api
|
||||
|
||||
const ALL_ROLL_TYPES = [
|
||||
export const ALL_ROLL_TYPES = [
|
||||
new RollTypeComp(),
|
||||
new RollTypeTache(),
|
||||
new RollTypeAttaque(),
|
||||
@@ -175,11 +175,11 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||
{
|
||||
static onCloseDoNothing() {
|
||||
}
|
||||
static onRollDoneDoNothing(dialog) {
|
||||
static onRollDoneDoNothing(dialog, roll) {
|
||||
dialog.render()
|
||||
}
|
||||
static onRollDoneClose(dialog) {
|
||||
if (!OptionsAvancees.isUsing(ROLL_DIALOG_V2_TEST))
|
||||
static onRollDoneClose(dialog, roll) {
|
||||
if (roll.type.retry || !OptionsAvancees.isUsing(ROLL_DIALOG_V2_TEST))
|
||||
dialog.close()
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||
|
||||
ChatRollResult.onReady()
|
||||
|
||||
foundry.applications.handlebars.loadTemplates(ALL_ROLL_TYPES.map(m => m.template))
|
||||
foundry.applications.handlebars.loadTemplates(ALL_ROLL_TYPES.map(m => m.chatResultTemplate))
|
||||
foundry.applications.handlebars.loadTemplates(ROLL_PARTS.map(p => p.template))
|
||||
ROLL_PARTS.forEach(p => p.onReady())
|
||||
|
||||
@@ -323,11 +323,10 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||
async r => await r.active.actor.appliquerAppelMoral(r),
|
||||
...(rollOptions.callbacks ?? [])
|
||||
],
|
||||
customChatMessage: rollOptions.customChatMessage,
|
||||
onRollDone: rollOptions.onRollDone ?? RollDialog.onRollDoneDoNothing,
|
||||
onClose: rollOptions.onClose ?? RollDialog.onCloseDoNothing
|
||||
}
|
||||
this.chatRollResult = new ChatRollResult();
|
||||
this.chatRollResult = new ChatRollResult()
|
||||
this.selectType()
|
||||
}
|
||||
|
||||
@@ -475,7 +474,7 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||
await impacts.applyImpacts()
|
||||
selectedRollType.onApplyImpacts(roll, impacts)
|
||||
await this.chatRollResult.display(roll, impacts)
|
||||
this.rollOptions.onRollDone(this)
|
||||
this.rollOptions.onRollDone(this, roll)
|
||||
}
|
||||
|
||||
static loadRollData(roll) {
|
||||
|
Reference in New Issue
Block a user