Added class "roll" for roll in chat
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user