feat: publicité des modules premium en tchat quand ils ne sont pas activés
This commit is contained in:
+4
-3
@@ -112,14 +112,15 @@ Hooks.once("babele.init", (babele) => {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async function welcomeMessage() {
|
||||
const noRulebook = !game.modules.find(m => m.id === "bol-rulebook")
|
||||
const noRulebook = !game.modules.get("bol-rulebook")?.active
|
||||
const noChronicles = !game.modules.get("bol-chronicles-1")?.active
|
||||
const content = await foundry.applications.handlebars.renderTemplate(
|
||||
"systems/bol/templates/chat/chat-welcome.hbs",
|
||||
{ noRulebook }
|
||||
{ noRulebook, noChronicles }
|
||||
)
|
||||
ChatMessage.create({ user: game.user.id, whisper: [game.user.id], content })
|
||||
|
||||
if (game.user.isGM && game.i18n.lang == 'en' && !game.modules.find(m => m.id == "babele")) {
|
||||
if (game.user.isGM && game.i18n.lang == 'en' && !game.modules.get("babele")?.active) {
|
||||
ChatMessage.create({
|
||||
user: game.user.id,
|
||||
whisper: [game.user.id],
|
||||
|
||||
Reference in New Issue
Block a user