Fix astrologie joueur
This commit is contained in:
@ -10,7 +10,7 @@ import { SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
export class RdDAstrologieJoueur extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async create(actor, dialogConfig) {
|
||||
static async create(actor) {
|
||||
|
||||
let dialogData = {
|
||||
nombres: this.organizeNombres(actor),
|
||||
@ -20,15 +20,14 @@ export class RdDAstrologieJoueur extends Dialog {
|
||||
astrologie: RdDItemCompetence.findCompetence(actor.items, 'Astrologie')
|
||||
}
|
||||
const html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-astrologie-joueur.html', dialogData);
|
||||
let options = { classes: ["rdd-roll-dialog"], width: 600, height: 500, 'z-index': 99999 };
|
||||
if (dialogConfig.options) {
|
||||
mergeObject(options, dialogConfig.options, { overwrite: true });
|
||||
}
|
||||
return new RdDAstrologieJoueur(html, actor, dialogData);
|
||||
|
||||
const options = { classes: ["rdd-roll-dialog"], width: 600, height: 'fit-content', 'z-index': 99999 };
|
||||
const dialog = new RdDAstrologieJoueur(html, actor, dialogData, options);
|
||||
dialog.render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
constructor(html, actor, dialogData) {
|
||||
constructor(html, actor, dialogData, dialogOptions) {
|
||||
const dialogConf = {
|
||||
title: "Nombres Astraux",
|
||||
content: html,
|
||||
@ -37,7 +36,6 @@ export class RdDAstrologieJoueur extends Dialog {
|
||||
saveButton: { label: "Fermer", callback: html => this.quitDialog() }
|
||||
},
|
||||
};
|
||||
const dialogOptions = { classes: ["rdd-roll-dialog"], width: 600, height: 300, 'z-index': 99999 };
|
||||
super(dialogConf, dialogOptions);
|
||||
|
||||
this.actor = actor;
|
||||
@ -49,9 +47,7 @@ export class RdDAstrologieJoueur extends Dialog {
|
||||
super.activateListeners(html);
|
||||
this.html = html;
|
||||
|
||||
this.html.find(function () {
|
||||
this.html.find("[name='diffConditions']").val(0);
|
||||
});
|
||||
this.html.find("[name='diffConditions']").val(0);
|
||||
|
||||
this.html.find('[name="jet-astrologie"]').click((event) => {
|
||||
this.requestJetAstrologie();
|
||||
|
Reference in New Issue
Block a user