This commit is contained in:
Erwan Lemaire
2025-05-02 13:19:49 +02:00
parent 5889a8111d
commit c35e93975b
14 changed files with 111 additions and 94 deletions
+2 -2
View File
@@ -131,7 +131,7 @@ export class TraitSelector extends Application {
/* -------------------------------------------- */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
id: "TRAITS_SELECTOR",
classes: ["vermine2047", "trait-selector"],
title: game.i18n.localize("VERMINE.traits_selector"),
template: 'systems/vermine2047/templates/applications/choose-traits.hbs',
popOut: true,
@@ -161,7 +161,7 @@ export class TraitSelector extends Application {
if (inp.type == "checkbox") {
inp.checked = true
}
}
}
}
await this.render(true)
}
+1
View File
@@ -31,6 +31,7 @@ export default class RollDialog extends Dialog {
}
},
close: close,
}
return super({ ...conf, ...data }, options);
};
+3
View File
@@ -43,6 +43,8 @@ export const preloadHandlebarsTemplates = async function () {
"systems/vermine2047/templates/item/partials/traits.html",
"systems/vermine2047/templates/item/partials/header.hbs",
"systems/vermine2047/templates/item/partials/physicalItems.hbs",
"systems/vermine2047/templates/item/chatCards/parts/base.html",
]);
};
@@ -125,6 +127,7 @@ export const registerHandlebarsHelpers = function () {
});
//return damge data
Handlebars.registerHelper('getDamagesData', function (damageObject, prop) {
let propObject = damageObject[prop]
let propValue = propObject[damageObject.value - 1]
return propValue