diff --git a/package-lock.json b/package-lock.json index 3ace79b2..81f1be4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3119,7 +3119,7 @@ } }, "foundry-vtt-types": { - "version": "github:League-of-Foundry-Developers/foundry-vtt-types#dc5ff5a9c75cda3f4999603221275ed8d7d9212c", + "version": "github:League-of-Foundry-Developers/foundry-vtt-types#865f9522eb8b81e15f34f06793e2cbf09e48d601", "from": "github:League-of-Foundry-Developers/foundry-vtt-types#foundry-0.7.9", "dev": true, "requires": { diff --git a/src/module/ds4.ts b/src/module/ds4.ts index be4543cd..84414037 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -33,7 +33,7 @@ Hooks.once("init", async function () { CONFIG.Item.typeLabels = DS4.i18n.itemTypes; // Configure Dice - CONFIG.Dice.types.push(DS4Check); // TODO(types) fix upstream + CONFIG.Dice.types.push(DS4Check); CONFIG.Dice.terms.s = DS4Check; // Register system settings diff --git a/src/module/rolls/check-factory.ts b/src/module/rolls/check-factory.ts index b2da3534..95ee765b 100644 --- a/src/module/rolls/check-factory.ts +++ b/src/module/rolls/check-factory.ts @@ -131,37 +131,32 @@ async function askGmModifier( const renderedHtml = await renderTemplate(usedTemplate, templateData); const dialogPromise = new Promise((resolve) => { - new Dialog( - { - title: usedTitle, - content: renderedHtml, - buttons: { - ok: { - label: game.i18n.localize("DS4.RollDialogOkButton"), - callback: (html) => { - if (!("jquery" in html)) { - throw new Error( - game.i18n.format("DS4.ErrorUnexpectedHtmlType", { - exType: "JQuery", - realType: "HTMLElement", - }), - ); - } else { - const innerForm = html[0].querySelector("form"); - resolve(innerForm); - } - }, - icon: "", // TODO(types): Remove once https://github.com/League-of-Foundry-Developers/foundry-vtt-types/issues/266 is fixed - }, - cancel: { - label: game.i18n.localize("DS4.RollDialogCancelButton"), - icon: "", // TODO(types): Remove once https://github.com/League-of-Foundry-Developers/foundry-vtt-types/issues/266 is fixed + new Dialog({ + title: usedTitle, + content: renderedHtml, + buttons: { + ok: { + label: game.i18n.localize("DS4.RollDialogOkButton"), + callback: (html) => { + if (!("jquery" in html)) { + throw new Error( + game.i18n.format("DS4.ErrorUnexpectedHtmlType", { + exType: "JQuery", + realType: "HTMLElement", + }), + ); + } else { + const innerForm = html[0].querySelector("form"); + resolve(innerForm); + } }, }, - default: "ok", + cancel: { + label: game.i18n.localize("DS4.RollDialogCancelButton"), + }, }, - {}, // TODO(types): Remove once https://github.com/League-of-Foundry-Developers/foundry-vtt-types/issues/267 is resolved - ).render(true); + default: "ok", + }).render(true); }); const dialogForm = await dialogPromise; return parseDialogFormData(dialogForm);