diff --git a/system/scripts/dice/roll.js b/system/scripts/dice/roll.js index 1e7792a..6bd1182 100644 --- a/system/scripts/dice/roll.js +++ b/system/scripts/dice/roll.js @@ -252,7 +252,6 @@ export class RollL5r5e extends Roll { // Prepare chat data messageData = mergeObject( { - borderColor: game.user.color, user: game.user._id, type: template, content: this._total, diff --git a/system/scripts/main-l5r5e.js b/system/scripts/main-l5r5e.js index 5dd1a74..2506e1d 100644 --- a/system/scripts/main-l5r5e.js +++ b/system/scripts/main-l5r5e.js @@ -177,10 +177,9 @@ Hooks.once("init", async function () { /* ------------------------------------ */ /* Setup system */ /* ------------------------------------ */ -Hooks.once("setup", function () { - // Do anything after initialization but before - // ready -}); +// Hooks.once("setup", function () { +// // Do anything after initialization but before ready +// }); /* ------------------------------------ */ /* Actor Dialog */ @@ -205,6 +204,16 @@ Hooks.on("renderSidebarTab", (app, html, data) => { }); }); +/* ------------------------------------ */ +/* Chat Message */ +/* ------------------------------------ */ +Hooks.on("renderChatMessage", (message, html, data) => { + // Add a extra CSS class to roll + if (message.isRoll) { + html.addClass("roll"); + } +}); + /* ------------------------------------ */ /* DiceSoNice Hook */ /* ------------------------------------ */ @@ -300,5 +309,3 @@ Hooks.once("ready", async function () { liensExt.render(true); }); }); - -// Add any additional hooks if necessary