Le massive export update

This commit is contained in:
WBHarry 2025-07-05 00:01:54 +02:00
parent 9c30e51546
commit ea9e96ae96
60 changed files with 919 additions and 914 deletions

View file

@ -0,0 +1,40 @@
import DHBaseAction from './baseAction.mjs';
export default class DHEffectAction extends DHBaseAction {
static extraSchemas = ['effects', 'target'];
async use(event, ...args) {
const config = await super.use(event, args);
if (['error', 'warning'].includes(config.type)) return;
return await this.chatApplyEffects(event, config);
}
async chatApplyEffects(event, data) {
const cls = getDocumentClass('ChatMessage'),
systemData = {
title: game.i18n.format('DAGGERHEART.Chat.ApplyEffect.Title', { name: this.name }),
origin: this.actor._id,
description: '',
targets: data.targets.map(x => ({ id: x.id, name: x.name, img: x.img, hit: true })),
action: {
itemId: this.item._id,
actionId: this._id
}
},
msg = new cls({
type: 'applyEffect',
user: game.user.id,
system: systemData,
content: await foundry.applications.handlebars.renderTemplate(
'systems/daggerheart/templates/ui/chat/apply-effects.hbs',
systemData
)
});
cls.create(msg.toObject());
}
get chatTemplate() {
return 'systems/daggerheart/templates/ui/chat/apply-effects.hbs';
}
}