mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-19 08:20:30 +01:00
fix labels in duality rolls messages and style experience and effects messages
This commit is contained in:
parent
b2fbb6ff50
commit
5463b0c7ed
6 changed files with 79 additions and 46 deletions
|
|
@ -614,7 +614,13 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
},
|
||||
hasRoll: true
|
||||
};
|
||||
this.document.diceRoll(config);
|
||||
this.document.diceRoll({
|
||||
...config,
|
||||
headerTitle: `${game.i18n.localize('DAGGERHEART.GENERAL.dualityRoll')}: ${this.actor.name}`,
|
||||
title: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', {
|
||||
ability: abilityLabel
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
//TODO: redo toggleEquipItem method
|
||||
|
|
|
|||
|
|
@ -121,21 +121,37 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) {
|
|||
*/
|
||||
static async #sendExpToChat(_, button) {
|
||||
const experience = this.document.system.experiences[button.dataset.id];
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
|
||||
const systemData = {
|
||||
name: game.i18n.localize('DAGGERHEART.GENERAL.Experience.single'),
|
||||
description: `${experience.name} ${experience.value.signedString()}`
|
||||
actor: { name: this.actor.name, img: this.actor.img },
|
||||
author: game.users.get(game.user.id),
|
||||
action: {
|
||||
name: `${experience.name} ${experience.value.signedString()}`,
|
||||
img: '/icons/sundries/misc/admission-ticket-blue.webp'
|
||||
},
|
||||
itemOrigin: {
|
||||
name: game.i18n.localize('DAGGERHEART.GENERAL.Experience.single')
|
||||
},
|
||||
description: experience.description
|
||||
};
|
||||
|
||||
foundry.documents.ChatMessage.implementation.create({
|
||||
type: 'abilityUse',
|
||||
const msg = {
|
||||
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
|
||||
)
|
||||
});
|
||||
),
|
||||
title: game.i18n.localize('DAGGERHEART.ACTIONS.Config.displayInChat'),
|
||||
speaker: cls.getSpeaker(),
|
||||
flags: {
|
||||
daggerheart: {
|
||||
cssClass: 'dh-chat-message dh-style'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
cls.create(msg);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue