Update CSS/Look & feel

This commit is contained in:
2026-04-03 00:39:39 +02:00
parent 23b105a47e
commit 9754bbc3a8
265 changed files with 12355 additions and 47899 deletions

View File

@@ -47,7 +47,7 @@ export class MournbladeCYD2Utility {
return parseInt(a) * parseInt(b);
})
game.settings.register("fvtt-mournblade-cyd2", "mournblade-cyd2-pause-logo", {
game.settings.register("fvtt-mournblade-cyd-2-0", "mournblade-cyd2-pause-logo", {
name: "Logo de pause",
scope: "world",
config: true,
@@ -60,6 +60,10 @@ export class MournbladeCYD2Utility {
},
})
// Initialise les listes de sélection dès le hook init (avant le rendu des fiches)
game.system.mournbladecyd2.config.listeNiveauSkill = this.createDirectOptionList(0, 10)
game.system.mournbladecyd2.config.listeNiveauCreature = this.createDirectOptionList(0, 35)
}
/* -------------------------------------------- */
@@ -102,16 +106,13 @@ export class MournbladeCYD2Utility {
/* -------------------------------------------- */
static async ready() {
const skills = await MournbladeCYD2Utility.loadCompendium("fvtt-mournblade-cyd2.skills")
const skills = await MournbladeCYD2Utility.loadCompendium("fvtt-mournblade-cyd-2-0.skills")
this.skills = skills.map(i => i.toObject())
// Setup pause logo
let logoPause = "systems/fvtt-mournblade-cyd2/assets/logos/" + game.settings.get("fvtt-mournblade-cyd2", "mournblade-cyd2-pause-logo") + ".webp"
let logoPause = "systems/fvtt-mournblade-cyd-2-0/assets/logos/" + game.settings.get("fvtt-mournblade-cyd-2-0", "mournblade-cyd2-pause-logo") + ".webp"
let logoImg = document.querySelector('#pause').children[0]
logoImg.setAttribute('style', `content: url(${logoPause})`)
game.system.mournbladecyd2.config.listeNiveauSkill = this.createDirectOptionList(0, 10)
game.system.mournbladecyd2.config.listeNiveauCreature = this.createDirectOptionList(0, 35)
}
/* -------------------------------------------- */
@@ -182,13 +183,13 @@ export class MournbladeCYD2Utility {
static async preloadHandlebarsTemplates() {
const templatePaths = [
'systems/fvtt-mournblade-cyd2/templates/editor-notes-gm.hbs',
'systems/fvtt-mournblade-cyd2/templates/partial-item-header.hbs',
'systems/fvtt-mournblade-cyd2/templates/partial-item-description.hbs',
'systems/fvtt-mournblade-cyd2/templates/partial-item-nav.hbs',
'systems/fvtt-mournblade-cyd2/templates/partial-item-prix.hbs',
'systems/fvtt-mournblade-cyd2/templates/partial-automation.hbs',
'systems/fvtt-mournblade-cyd2/templates/hud-adversites.hbs',
'systems/fvtt-mournblade-cyd-2-0/templates/editor-notes-gm.hbs',
'systems/fvtt-mournblade-cyd-2-0/templates/partial-item-header.hbs',
'systems/fvtt-mournblade-cyd-2-0/templates/partial-item-description.hbs',
'systems/fvtt-mournblade-cyd-2-0/templates/partial-item-nav.hbs',
'systems/fvtt-mournblade-cyd-2-0/templates/partial-item-prix.hbs',
'systems/fvtt-mournblade-cyd-2-0/templates/partial-automation.hbs',
'systems/fvtt-mournblade-cyd-2-0/templates/hud-adversites.hbs',
]
return foundry.applications.handlebars.loadTemplates(templatePaths);
}
@@ -372,7 +373,7 @@ export class MournbladeCYD2Utility {
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
defender.changeEtatCombativite(value)
} else {
game.socket.emit("system.fvtt-mournblade-cyd2", { msg: "msg_apply_combativite", data: { defenderTokenId: rollData.defenderTokenId, value } });
game.socket.emit("system.fvtt-mournblade-cyd-2-0", { msg: "msg_apply_combativite", data: { defenderTokenId: rollData.defenderTokenId, value } });
}
}
/* -------------------------------------------- */
@@ -383,7 +384,7 @@ export class MournbladeCYD2Utility {
rollData.attrKey = "adr"
}
if (!rollData.attr) {
rollData.actionImg = "systems/fvtt-mournblade-cyd2/assets/icons/" + actor.system.attributs[rollData.attrKey].labelnorm + ".webp"
rollData.actionImg = "systems/fvtt-mournblade-cyd-2-0/assets/icons/" + actor.system.attributs[rollData.attrKey].labelnorm + ".webp"
rollData.attr = foundry.utils.duplicate(actor.system.attributs[rollData.attrKey])
}
if (rollData.attrKey2 != "none") {
@@ -503,7 +504,7 @@ export class MournbladeCYD2Utility {
}
this.createChatWithRollMode(rollData.alias, {
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-mournblade-cyd2/templates/chat-generic-result.hbs`, rollData)
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-mournblade-cyd-2-0/templates/chat-generic-result.hbs`, rollData)
}, rollData)
if ((rollData.coupBas || rollData.arme) && rollData.isSuccess && rollData.defenderTokenId) {
@@ -610,7 +611,7 @@ export class MournbladeCYD2Utility {
this.computeResultQuality(rollData)
this.createChatWithRollMode(rollData.alias, {
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-mournblade-cyd2/templates/chat-generic-result.hbs`, rollData)
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-mournblade-cyd-2-0/templates/chat-generic-result.hbs`, rollData)
}, rollData)
}
@@ -641,7 +642,7 @@ export class MournbladeCYD2Utility {
chatGM.whisper = this.getUsers(user => user.isGM);
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
console.log("blindMessageToGM", chatGM);
game.socket.emit("system.fvtt-mournblade-cyd2", { msg: "msg_gm_chat_message", data: chatGM });
game.socket.emit("system.fvtt-mournblade-cyd-2-0", { msg: "msg_gm_chat_message", data: chatGM });
}
/* -------------------------------------------- */