feat: publicité des modules premium en tchat quand ils ne sont pas activés

This commit is contained in:
2026-08-03 06:38:54 +02:00
parent 33d4c26619
commit 1b24d0223a
8 changed files with 48 additions and 27 deletions
+15 -9
View File
@@ -1512,6 +1512,21 @@ h2.bad {
.bol-welcome-card .welcome-body a {
color: darkred;
}
.bol-welcome-card .welcome-body .welcome-premium {
margin-top: 6px;
padding: 6px 10px;
font-size: 0.8rem;
color: #191813;
background: linear-gradient(135deg, #fdf7e6, #f6e8c8);
border: 1px solid #c9a227;
border-left: 4px solid #c9a227;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.bol-welcome-card .welcome-body .welcome-premium a {
color: #7a5c00;
font-weight: bold;
}
.bol-welcome-card .welcome-footer {
margin-top: 8px;
padding: 4px 10px;
@@ -1522,15 +1537,6 @@ h2.bad {
border-radius: 4px;
letter-spacing: 0.5px;
}
.bol-welcome-card .welcome-warning {
margin-top: 6px;
padding: 4px 8px;
font-size: 0.8rem;
color: #7a0000;
background: #fff3f3;
border: 1px solid #e57373;
border-radius: 3px;
}
/* Component Styles */
/* ----------------------------------------- */
/* Common Sheet Styles */
+2 -1
View File
@@ -469,7 +469,8 @@
"BOL.chat.welcome4": "Im Discord findet ihr Support für die FoundryVTT-Implementierung dieses Systems: https://discord.gg/pPSDNJk",
"BOL.chat.welcome5": "Auf ein gutes Spiel in Lemuria!",
"BOL.chat.welcome6": "",
"BOL.chat.bolRulebookMessage": "Don't miss the full Rulebook module (including Sagas) available at : https://www.ludospherik-editions.com/en_gb/ !",
"BOL.chat.bolRulebookMessage": "Don't miss the premium Rulebook module (including Sagas), available on the Foundry website : <a href='https://foundryvtt.com/packages/bol-rulebook' target='_blank'>https://foundryvtt.com/packages/bol-rulebook</a>",
"BOL.chat.bolChroniclesMessage": "Discover the premium Chronicles of Lemuria module (vol. 1), available on the Foundry website : <a href='https://foundryvtt.com/packages/bol-chronicles-1' target='_blank'>https://foundryvtt.com/packages/bol-chronicles-1</a>",
"BOL.settings.rollArmor": "Roll for armor",
"BOL.settings.rollArmorTooltip": "Roll for armor value, fixed value if unchecked",
+2 -1
View File
@@ -545,7 +545,8 @@
"BOL.chat.criticalbuttonjournal": "Legendary/Heroic Success",
"BOL.chat.nodamage": "Do not apply damages",
"BOL.chat.armorRoll": "Armor roll",
"BOL.chat.bolRulebookMessage": "Don't miss the full Rulebook module (including Sagas) available at : https://www.ludospherik-editions.com/en_gb/ !",
"BOL.chat.bolRulebookMessage": "Don't miss the premium Rulebook module (including Sagas), available on the Foundry website : <a href='https://foundryvtt.com/packages/bol-rulebook' target='_blank'>https://foundryvtt.com/packages/bol-rulebook</a>",
"BOL.chat.bolChroniclesMessage": "Discover the premium Chronicles of Lemuria module (vol. 1), available on the Foundry website : <a href='https://foundryvtt.com/packages/bol-chronicles-1' target='_blank'>https://foundryvtt.com/packages/bol-chronicles-1</a>",
"BOL.dialog.soeasy": "So easy (+4)",
"BOL.dialog.soeasy3": "So easy (+3)",
+2 -1
View File
@@ -535,7 +535,8 @@
"BOL.chat.criticalinfo": "¡Esto es un éxito Asombroso o Legendario! Escoge tus opciones y efectos",
"BOL.chat.criticalbuttonjournal": "Éxito Asombroso/Legendario",
"BOL.chat.armorRoll": "Tirada de Armadura",
"BOL.chat.bolRulebookMessage": "Don't miss the full Rulebook module (including Sagas) available at : https://www.ludospherik-editions.com/en_gb/ !",
"BOL.chat.bolRulebookMessage": "Don't miss the premium Rulebook module (including Sagas), available on the Foundry website : <a href='https://foundryvtt.com/packages/bol-rulebook' target='_blank'>https://foundryvtt.com/packages/bol-rulebook</a>",
"BOL.chat.bolChroniclesMessage": "Discover the premium Chronicles of Lemuria module (vol. 1), available on the Foundry website : <a href='https://foundryvtt.com/packages/bol-chronicles-1' target='_blank'>https://foundryvtt.com/packages/bol-chronicles-1</a>",
"BOL.dialog.soeasy": "Demasiado fácil (+4)",
"BOL.dialog.veryeasy": "Muy fácil (+2)",
+2 -1
View File
@@ -571,7 +571,8 @@
"BOL.chat.criticalinfo": "C'est un succès Héroïque ! Choisissez vos options et effets !",
"BOL.chat.criticallegendaryinfo": "C'est un succès Légendaire ! Choisissez vos options et effets !",
"BOL.chat.criticalbuttonjournal": "Succès Héroïque/Légendaire",
"BOL.chat.bolRulebookMessage": "N'oubliez pas le module complet du Livre de Règle et des Sagas disponible ici : https://www.ludospherik-editions.com !",
"BOL.chat.bolRulebookMessage": "N'oubliez pas le module premium du Livre de Règle et des Sagas, disponible sur le site Foundry : <a href='https://foundryvtt.com/packages/bol-rulebook' target='_blank'>https://foundryvtt.com/packages/bol-rulebook</a>",
"BOL.chat.bolChroniclesMessage": "Découvrez le module premium des Chroniques de Lémurie (vol. 1), disponible sur le site Foundry : <a href='https://foundryvtt.com/packages/bol-chronicles-1' target='_blank'>https://foundryvtt.com/packages/bol-chronicles-1</a>",
"BOL.chat.losshp": "{name} a perdu {lossHP} points de Vitalité. Si il se repose quelques minutes, il peut récupérer {recupHP} points de Vitalité.",
"BOL.chat.applyrecup": "Récupérer pendant quelques minutes (+{recupHP} Vitalité)",
"BOL.chat.inforecup": "{name} vient de récupérer {recupHP} points de Vitalité après quelques minutes de repos.",
+4 -3
View File
@@ -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],
+17 -10
View File
@@ -900,6 +900,23 @@ h2.bad {
}
a { color: darkred; }
.welcome-premium {
margin-top: 6px;
padding: 6px 10px;
font-size: 0.8rem;
color: #191813;
background: linear-gradient(135deg, #fdf7e6, #f6e8c8);
border: 1px solid #c9a227;
border-left: 4px solid #c9a227;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
a {
color: #7a5c00;
font-weight: bold;
}
}
}
.welcome-footer {
@@ -912,14 +929,4 @@ h2.bad {
border-radius: 4px;
letter-spacing: 0.5px;
}
.welcome-warning {
margin-top: 6px;
padding: 4px 8px;
font-size: 0.8rem;
color: #7a0000;
background: #fff3f3;
border: 1px solid #e57373;
border-radius: 3px;
}
}
+4 -1
View File
@@ -14,7 +14,10 @@
<p>{{{localize "BOL.chat.welcome5"}}}</p>
<div class="welcome-footer">🗡 {{{localize "BOL.chat.welcome6"}}}</div>
{{#if noRulebook}}
<p class="welcome-warning">{{{localize "BOL.chat.bolRulebookMessage"}}}</p>
<p class="welcome-premium">⚔️ {{{localize "BOL.chat.bolRulebookMessage"}}}</p>
{{/if}}
{{#if noChronicles}}
<p class="welcome-premium">📜 {{{localize "BOL.chat.bolChroniclesMessage"}}}</p>
{{/if}}
</div>
</div>