Ran prettier

This commit is contained in:
WBHarry 2025-05-23 18:45:22 +02:00
parent 5fc5d988e6
commit 48ab150a4e
133 changed files with 13852 additions and 12549 deletions

View file

@ -1,32 +1,32 @@
const {HandlebarsApplicationMixin, ApplicationV2} = foundry.applications.api;
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
export default class DhpDeathMove extends HandlebarsApplicationMixin(ApplicationV2) {
constructor(actor){
constructor(actor) {
super({});
this.actor = actor;
this.selectedMove = null;
}
get title(){
return game.i18n.format("DAGGERHEART.Application.DeathMove.Title", { actor: this.actor.name });
get title() {
return game.i18n.format('DAGGERHEART.Application.DeathMove.Title', { actor: this.actor.name });
}
static DEFAULT_OPTIONS = {
classes: ["daggerheart", "views", "death-move"],
classes: ['daggerheart', 'views', 'death-move'],
position: { width: 800, height: 'auto' },
actions: {
selectMove: this.selectMove,
takeMove: this.takeMove,
},
takeMove: this.takeMove
}
};
static PARTS = {
application: {
id: "death-move",
template: "systems/daggerheart/templates/views/deathMove.hbs"
id: 'death-move',
template: 'systems/daggerheart/templates/views/deathMove.hbs'
}
}
};
async _prepareContext(_options) {
const context = await super._prepareContext(_options);
@ -36,28 +36,27 @@ export default class DhpDeathMove extends HandlebarsApplicationMixin(Application
return context;
}
static selectMove(_, button){
static selectMove(_, button) {
const move = button.dataset.move;
this.selectedMove = SYSTEM.GENERAL.deathMoves[move];
this.render();
}
static async takeMove(){
const cls = getDocumentClass("ChatMessage");
static async takeMove() {
const cls = getDocumentClass('ChatMessage');
const msg = new cls({
user: game.user.id,
content: await renderTemplate("systems/daggerheart/templates/chat/deathMove.hbs", {
player: game.user.character.name,
title: game.i18n.localize(this.selectedMove.name),
content: await renderTemplate('systems/daggerheart/templates/chat/deathMove.hbs', {
player: game.user.character.name,
title: game.i18n.localize(this.selectedMove.name),
img: this.selectedMove.img,
description: game.i18n.localize(this.selectedMove.description),
}),
description: game.i18n.localize(this.selectedMove.description)
})
});
cls.create(msg.toObject());
this.close();
}
}
}