Manage selective fire

This commit is contained in:
2025-06-15 00:30:24 +02:00
parent e0400793ff
commit 9e4d76298c
35 changed files with 654 additions and 122 deletions

View File

@@ -124,12 +124,12 @@ Hooks.once("ready", function () {
}
preLocalizeConfig()
if (game.user.isGM && game.i18n.lang === 'fr' && !game.modules.find(m => m.id == "babele")) {
if (game.user.isGM && game.i18n.lang === 'fr' && typeof Babele === 'undefined') {
ChatMessage.create({
user: game.user.id,
whisper: [game.user.id],
content: `<div ><span class="">
<strong>ATTENTION ! Français détecte, mais le module Babele n'est pas installé !<br>Installez Babele pour bénéficier de la traduction des compendiums`
<strong>ATTENTION ! Français détecté, mais le module Babele n'est pas installé !<br>Installez Babele pour bénéficier de la traduction des compendiums`
})
}
@@ -144,12 +144,18 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
$(html).find(".damage-roll").each((i, btn) => {
btn.style.display = "inline"
})
$(html).find(".healing-roll").each((i, btn) => {
btn.style.display = "inline"
})
$(html).find(".nudge-roll").click((event) => {
CthulhuEternalUtils.nudgeRoll(message)
})
$(html).find(".damage-roll").click((event) => {
CthulhuEternalUtils.damageRoll(message)
})
$(html).find(".healing-roll").click((event) => {
CthulhuEternalUtils.healingRoll(message)
})
}
})