DataModels + Appv2 migration : OK

This commit is contained in:
2026-03-01 01:12:00 +01:00
parent 1ffb8b08fc
commit 6c70dc147c
130 changed files with 2998 additions and 741 deletions

View File

@@ -110,35 +110,22 @@ Hooks.once('init', async function () {
/* -------------------------------------------- */
function welcomeMessage() {
let content = `<div id="welcome-message-bol"><span class="rdd-roll-part">
<strong>` + game.i18n.localize("BOL.chat.welcome1") + `</strong><p>` +
game.i18n.localize("BOL.chat.welcome2") + "</p><p>" +
game.i18n.localize("BOL.chat.welcome3") + "</p><p>" +
game.i18n.localize("BOL.chat.welcome4") + "</p><p>" +
game.i18n.localize("BOL.chat.welcome5") + "</p>" +
game.i18n.localize("BOL.chat.welcome6")
async function welcomeMessage() {
const noRulebook = !game.modules.find(m => m.id === "bol-rulebook")
const content = await foundry.applications.handlebars.renderTemplate(
"systems/bol/templates/chat/chat-welcome.hbs",
{ noRulebook }
)
ChatMessage.create({ user: game.user.id, whisper: [game.user.id], content })
let rulebook = game.modules.find( m => m.id === "bol-rulebook")
if ( !rulebook ) {
content += "<p>" + game.i18n.localize("BOL.chat.bolRulebookMessage") + "</p>"
}
ChatMessage.create({
user: game.user.id,
whisper: [game.user.id],
content: 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.find(m => m.id == "babele")) {
ChatMessage.create({
user: game.user.id,
whisper: [game.user.id],
content: `<div id="welcome-message-bol"><span class="rdd-roll-part">
<strong>WARNING ! English language selected, but Babele module is not installed !<br>Please install babele from the module tab in Foundry interface.`
} )
content: `<div class="bol-welcome-card"><div class="welcome-body"><p class="welcome-warning">⚠ WARNING ! English language selected, but Babele module is not installed !<br>Please install babele from the module tab in Foundry interface.</p></div></div>`
})
ui.notifications.warn("WARNING ! English language selected, but babele module is not installed !<br>Please install babele from the module tab in Foundry interface.")
}
}
/* -------------------------------------------- */