some work on 20 questions
fix on actor narrative : social_standing -> social
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { TwentyQuestionsDialog } from "./twenty-questions-dialog.js";
|
||||
|
||||
export class ActorSheetL5r5e extends ActorSheet {
|
||||
static get defaultOptions() {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
@@ -10,6 +12,25 @@ export class ActorSheetL5r5e extends ActorSheet {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the TwentyQuestions button on top of sheet
|
||||
* @override
|
||||
*/
|
||||
_getHeaderButtons() {
|
||||
let buttons = super._getHeaderButtons();
|
||||
|
||||
buttons.unshift({
|
||||
label: "20Q", // TODO localization
|
||||
class: "twenty-questions",
|
||||
icon: "fas fa-graduation-cap",
|
||||
onclick: async () => {
|
||||
await new TwentyQuestionsDialog({}, this.actor).render(true);
|
||||
},
|
||||
});
|
||||
|
||||
return buttons;
|
||||
}
|
||||
|
||||
getData() {
|
||||
const sheetData = super.getData();
|
||||
|
||||
@@ -131,8 +152,6 @@ export class ActorSheetL5r5e extends ActorSheet {
|
||||
* @param {string} skillId Unique ID of the skill been clicked.
|
||||
*/
|
||||
async _onSkillClicked(skillId) {
|
||||
console.log("Clicked on skill " + skillId);
|
||||
|
||||
new game.l5r5e.DicePickerDialog({ skillId: skillId, actor: this.actor }).render();
|
||||
new game.l5r5e.DicePickerDialog({ skillId: skillId, actor: this.actor }).render(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user