style items and action chat messages

This commit is contained in:
moliloo 2025-07-27 14:16:20 -03:00
parent dddee78356
commit a9fca36ed5
17 changed files with 365 additions and 102 deletions

View file

@ -142,10 +142,18 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
content: await foundry.applications.handlebars.renderTemplate(
'systems/daggerheart/templates/ui/chat/downtime.hbs',
{
title: `${this.actor.name} - ${game.i18n.localize(`DAGGERHEART.APPLICATIONS.Downtime.${this.shortrest ? 'shortRest' : 'longRest'}.title`)}`,
title: game.i18n.localize(
`DAGGERHEART.APPLICATIONS.Downtime.${this.shortrest ? 'shortRest' : 'longRest'}.title`
),
actor: { name: this.actor.name, img: this.actor.img },
moves: moves
}
)
),
flags: {
daggerheart: {
cssClass: 'dh-chat-message dh-style'
}
}
});
cls.create(msg.toObject());

View file

@ -249,19 +249,23 @@ export function ActionMixin(Base) {
const systemData = {
title: game.i18n.localize('DAGGERHEART.CONFIG.ActionType.action'),
origin: origin,
img: this.img,
name: this.name,
action: { name: this.name, img: this.img, tags: this.tags ? this.tags : ['Spell', 'Arcana', 'Lv 10'] },
itemOrigin: this.item,
description: this.description,
actions: []
};
const msg = {
type: 'abilityUse',
user: game.user.id,
system: systemData,
content: await foundry.applications.handlebars.renderTemplate(
'systems/daggerheart/templates/ui/chat/ability-use.hbs',
'systems/daggerheart/templates/ui/chat/action.hbs',
systemData
)
),
flags: {
daggerheart: {
cssClass: 'dh-chat-message dh-style'
}
}
};
cls.create(msg);

View file

@ -121,9 +121,9 @@ export default class DHItem extends foundry.documents.Item {
: game.i18n.localize('DAGGERHEART.UI.Chat.foundationCard.subclassFeatureTitle'),
origin: origin,
img: this.img,
name: this.name,
item: { name: this.name, img: this.img, tags: this.tags ? this.tags : ['Spell', 'Arcana', 'Lv 10'] },
description: this.system.description,
actions: []
actions: this.system.actions
};
const msg = new cls({
type: 'abilityUse',
@ -132,7 +132,12 @@ export default class DHItem extends foundry.documents.Item {
content: await foundry.applications.handlebars.renderTemplate(
'systems/daggerheart/templates/ui/chat/ability-use.hbs',
systemData
)
),
flags: {
daggerheart: {
cssClass: 'dh-chat-message dh-style'
}
}
});
cls.create(msg.toObject());