Ajout du symbole d20, pour les roll de formule

This commit is contained in:
Vincent Vandemeulebrouck 2025-01-14 22:24:20 +01:00
parent c5633a9fc5
commit 40a47ee8a2
4 changed files with 8 additions and 4 deletions

View File

@ -18,7 +18,7 @@ export class TextRollFormula {
async onRollText(event, actor) { async onRollText(event, actor) {
const node = TextRollManager.getNode(event) const node = TextRollManager.getNode(event)
const rollFormula = node.data('roll-formula') const rollFormula = node.data('formula')
if (rollFormula) { if (rollFormula) {
const roll = new Roll(rollFormula) const roll = new Roll(rollFormula)
await roll.evaluate() await roll.evaluate()

View File

@ -1050,6 +1050,10 @@ a.content-link {
white-space: nowrap; white-space: nowrap;
word-break: break-all; word-break: break-all;
} }
a.roll-text i.fas{
color: var(--color-text-dark-inactive);
margin-right: 0.25em;
}
li label.compteur { li label.compteur {

View File

@ -1,8 +1,8 @@
<span class="content-link roll-text-link" <span class="content-link roll-text-link"
data-code="{{param.code}}" data-code="{{param.code}}"
data-json="{{json-stringify param}}" data-json="{{json-stringify param}}"
data-roll-formula="{{param.formula}}"> data-formula="{{param.formula}}">
<a class="roll-text">{{~param.formula~}}</a> <a class="roll-text"><i class="fas fa-dice-d20"></i>{{param.formula}}</a>
{{~#if options.showlink}} {{~#if options.showlink}}
<a class="chat-roll-text" data-tooltip="Montrer"><i class="fas fa-comment"></i></a> <a class="chat-roll-text" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
{{/if~}} {{/if~}}

View File

@ -10,7 +10,7 @@
<p>{{linkCompendium document.pack document.id document.name}}</p> <p>{{linkCompendium document.pack document.id document.name}}</p>
{{#if document.system.formule}} {{#if document.system.formule}}
<div class="poesie-extrait"> <div class="poesie-extrait">
[[/r {{document.system.formule}}]] @roll[{{document.system.formule}}]
</div> </div>
{{/if}} {{/if}}
{{#if document.system.description}} {{#if document.system.description}}