fix formapp constructor
This commit is contained in:
@@ -31,7 +31,7 @@ export class CharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
class: "twenty-questions",
|
class: "twenty-questions",
|
||||||
icon: "fas fa-graduation-cap",
|
icon: "fas fa-graduation-cap",
|
||||||
onclick: async () => {
|
onclick: async () => {
|
||||||
await new TwentyQuestionsDialog({}, this.actor).render(true);
|
await new TwentyQuestionsDialog(this.actor).render(true);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return buttons;
|
return buttons;
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
/**
|
/**
|
||||||
* Create dialog
|
* Create dialog
|
||||||
*/
|
*/
|
||||||
constructor(options = null, actor = null) {
|
constructor(actor = null, options = {}) {
|
||||||
super(options);
|
super({}, options);
|
||||||
this.actor = actor;
|
this.actor = actor;
|
||||||
this.object = new TwentyQuestions(actor);
|
this.object = new TwentyQuestions(actor);
|
||||||
this.errors = this.object.validateForm();
|
this.errors = this.object.validateForm();
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ export class TwentyQuestions {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// TODO Tmp
|
// TODO Tmp
|
||||||
console.log(actor);
|
// console.log(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
*
|
*
|
||||||
* @param options actor, actorId, ringId, skillId, skillCatId, difficulty, difficultyHidden
|
* @param options actor, actorId, ringId, skillId, skillCatId, difficulty, difficultyHidden
|
||||||
*/
|
*/
|
||||||
constructor(options = null) {
|
constructor(options = {}) {
|
||||||
super(options);
|
super({}, options);
|
||||||
|
|
||||||
// Try to get Actor from: options, first selected token or player's selected character
|
// Try to get Actor from: options, first selected token or player's selected character
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user