Added class "roll" for roll in chat
This commit is contained in:
@@ -252,7 +252,6 @@ export class RollL5r5e extends Roll {
|
|||||||
// Prepare chat data
|
// Prepare chat data
|
||||||
messageData = mergeObject(
|
messageData = mergeObject(
|
||||||
{
|
{
|
||||||
borderColor: game.user.color,
|
|
||||||
user: game.user._id,
|
user: game.user._id,
|
||||||
type: template,
|
type: template,
|
||||||
content: this._total,
|
content: this._total,
|
||||||
|
|||||||
@@ -177,10 +177,9 @@ Hooks.once("init", async function () {
|
|||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
/* Setup system */
|
/* Setup system */
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
Hooks.once("setup", function () {
|
// Hooks.once("setup", function () {
|
||||||
// Do anything after initialization but before
|
// // Do anything after initialization but before ready
|
||||||
// ready
|
// });
|
||||||
});
|
|
||||||
|
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
/* Actor Dialog */
|
/* 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 */
|
/* DiceSoNice Hook */
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
@@ -300,5 +309,3 @@ Hooks.once("ready", async function () {
|
|||||||
liensExt.render(true);
|
liensExt.render(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add any additional hooks if necessary
|
|
||||||
|
|||||||
Reference in New Issue
Block a user