Added class "roll" for roll in chat

This commit is contained in:
Vlyan
2021-01-04 17:47:40 +01:00
parent 3b261f5d10
commit 1edebf04cc
2 changed files with 13 additions and 7 deletions

View File

@@ -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,

View File

@@ -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