From 40a47ee8a2030913fcfec72f06f425d587b9ac4d Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 14 Jan 2025 22:24:20 +0100 Subject: [PATCH] Ajout du symbole d20, pour les roll de formule --- module/apps/textroll/text-roll-formula.js | 2 +- styles/simple.css | 4 ++++ templates/apps/textroll/link-text-roll-formula.hbs | 4 ++-- templates/chat-compendium-table-roll.hbs | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/module/apps/textroll/text-roll-formula.js b/module/apps/textroll/text-roll-formula.js index 5b025024..9fe5897c 100644 --- a/module/apps/textroll/text-roll-formula.js +++ b/module/apps/textroll/text-roll-formula.js @@ -18,7 +18,7 @@ export class TextRollFormula { async onRollText(event, actor) { const node = TextRollManager.getNode(event) - const rollFormula = node.data('roll-formula') + const rollFormula = node.data('formula') if (rollFormula) { const roll = new Roll(rollFormula) await roll.evaluate() diff --git a/styles/simple.css b/styles/simple.css index 2457de0f..fa3020a9 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1050,6 +1050,10 @@ a.content-link { white-space: nowrap; word-break: break-all; } +a.roll-text i.fas{ + color: var(--color-text-dark-inactive); + margin-right: 0.25em; +} li label.compteur { diff --git a/templates/apps/textroll/link-text-roll-formula.hbs b/templates/apps/textroll/link-text-roll-formula.hbs index 35adcb41..e1118de8 100644 --- a/templates/apps/textroll/link-text-roll-formula.hbs +++ b/templates/apps/textroll/link-text-roll-formula.hbs @@ -1,8 +1,8 @@ -{{~param.formula~}} + data-formula="{{param.formula}}"> +{{param.formula}} {{~#if options.showlink}} {{/if~}} diff --git a/templates/chat-compendium-table-roll.hbs b/templates/chat-compendium-table-roll.hbs index 2f5a76c0..7c5457a1 100644 --- a/templates/chat-compendium-table-roll.hbs +++ b/templates/chat-compendium-table-roll.hbs @@ -10,7 +10,7 @@

{{linkCompendium document.pack document.id document.name}}

{{#if document.system.formule}}
- [[/r {{document.system.formule}}]] + @roll[{{document.system.formule}}]
{{/if}} {{#if document.system.description}}