Added a different view for hidden roll in ChatMessage (GM/Players).

This commit is contained in:
Vlyan
2022-04-25 18:44:40 +02:00
parent f83a17aec9
commit d14ed8023f
4 changed files with 23 additions and 17 deletions

View File

@@ -68,10 +68,17 @@ export default class HooksL5r5e {
* Chat Message
*/
static renderChatMessage(message, html, data) {
// Add a extra CSS class to roll
if (message.isRoll) {
// Add an extra CSS class to roll
html.addClass("roll");
html.on("click", ".chat-dice-rnk", game.l5r5e.RollnKeepDialog.onChatAction.bind(this));
// Remove specific elements
if (game.user.isGM) {
html.find(".player-only").remove();
} else {
html.find(".gm-only").remove();
}
}
}