Fix: lien jets de dés

- les boutons pour envoyer dans le tchat sont affichés
- les jets de carac utilisent bien les compétences et difficulté
This commit is contained in:
2025-01-13 19:24:21 +01:00
parent 135e5e46a0
commit 8406c8434a
3 changed files with 10 additions and 7 deletions

View File

@ -9,16 +9,17 @@ import { TextRollManager } from "./textroll/text-roll-formatter.js";
const TEXT_ROLL_MANAGERS = [
new TextRollAlchimie(),
new TextRollCaracCompetence(),
new TextRollFormula()];
new TextRollFormula()]
export class RdDTextEditor {
static registerChatCallbacks(html) {
html.on("click", '.roll-text', async event => await RdDTextEditor.rollText(event))
}
static async enrichHTML(text, object, options = {}) {
static async enrichHTML(text, object, options = {showlink:true}) {
const context = {
text, object,
text,
object,
options,
competences: await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage),
}
@ -29,7 +30,6 @@ export class RdDTextEditor {
context.text = await manager.onReplaceRoll(context);
}
// TEXT_ROLL_MANAGERS.forEach(async manager => await RdDTextEditor._applyReplaceAll(manager, context))
return await TextEditor.enrichHTML(context.text, {
relativeTo: object,
secrets: object?.isOwner,