CSS rework et autres améliorations

This commit is contained in:
2026-02-12 23:05:22 +01:00
parent 39da08d4cb
commit f26130d208
63 changed files with 3280 additions and 1023 deletions

View File

@@ -713,7 +713,7 @@ export class TeDeumActor extends Actor {
async rollDegatsArme(armeId) {
let weapon = this.items.get(armeId)
if (weapon) {
let bDegats = 0
let bDegats = { value: 0 }
if (weapon.system.typeArme == "melee") {
bDegats = this.getBonusDegats()
}
@@ -728,7 +728,7 @@ export class TeDeumActor extends Actor {
rollData.degats = degatsRoll.total
let msg = await TeDeumUtility.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-te-deum/templates/chat/chat-degats-result.hbs`, rollData)
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-te-deum/templates/chat/chat-degats-result.hbs`, rollData)
})
await msg.setFlag("world", "te-deum-rolldata", rollData)
console.log("Rolldata result", rollData)

View File

@@ -567,6 +567,7 @@ export class TeDeumUtility {
await critiqueRoll.evaluate()
await this.showDiceSoNice(critiqueRoll, game.settings.get("core", "rollMode"))
rollData.critiqueRoll = foundry.utils.duplicate(critiqueRoll)
rollData.critiqueTotal = critiqueRoll.total
if (critiqueRoll.total > rollData.competence.system.score) {
rollData.isEchecCritique = true
}

View File

@@ -6,7 +6,7 @@ export class TeDeumRollDialog extends Dialog {
static async create(actor, rollData) {
let options = { classes: ["tedeum-roll-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 }
let html = await renderTemplate('systems/fvtt-te-deum/templates/dialogs/roll-dialog-generic.hbs', rollData);
let html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-te-deum/templates/dialogs/roll-dialog-generic.hbs', rollData);
return new TeDeumRollDialog(actor, rollData, html, options);
}
@@ -43,7 +43,7 @@ export class TeDeumRollDialog extends Dialog {
/* -------------------------------------------- */
async refreshDialog() {
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/roll-dialog-generic.hbs", this.rollData)
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-te-deum/templates/dialogs/roll-dialog-generic.hbs", this.rollData)
this.data.content = content
this.render(true)
}

View File

@@ -91,7 +91,7 @@ export class TeDeumItemSheet extends foundry.appv1.sheets.ItemSheet {
payload: chatData,
});
renderTemplate('systems/fvtt-te-deum/templates/post-item.html', chatData).then(html => {
foundry.applications.handlebars.renderTemplate('systems/fvtt-te-deum/templates/post-item.html', chatData).then(html => {
let chatOptions = TeDeumUtility.chatDataSetup(html);
ChatMessage.create(chatOptions)
});