fix: tests complets - onglets, message de tchat, scores bonus/malus
- Onglets item (Anomalie/Aspect/Attribut): correction tabGroups + data-group sur chaque <a> et <section> - Onglets acteur (PJ/PNJ): tab.cssClass dans les templates pour l'état actif initial - Message de tchat: alignement des noms de variables _getChatCardData <-> chat-message.hbs - actorName, actorImg, success/failure, diceResults, statLabel/skillLabel localisés - difficultyLabel et moonPhaseLabel localisés depuis SYSTEM - Dialogue de jet (roll-dialog.hbs): correction noms variables + min/max modificateur - lang/fr.json: ajout Roll.title, Roll.roll, clés Moon (minuscules), Difficulty (unknown/ardu) - character.mjs: passage statLabel à CelestopolRoll.prompt() - global.less: padding + overflow-y sur .tab pour contenu visible - item-scores.hbs: passage system=system au partial + suppression garde isEditable - Templates anomaly/aspect/attribute: passage system=system au partial item-scores - chat-message.mjs: getHTML() → renderHTML() (dépréciation FVTT v13) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
export default class CelestopolChatMessage extends ChatMessage {
|
||||
/** @override */
|
||||
async getHTML() {
|
||||
const html = await super.getHTML()
|
||||
return html
|
||||
async renderHTML(options = {}) {
|
||||
return super.renderHTML(options)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,9 +35,11 @@ export class CelestopolRoll extends Roll {
|
||||
|
||||
const dialogContext = {
|
||||
actorName: options.actorName,
|
||||
statLabel: options.statLabel,
|
||||
skillLabel: options.skillLabel,
|
||||
skillValue: options.skillValue,
|
||||
woundMalus: options.woundMalus ?? 0,
|
||||
nbDice: Math.max(1, options.skillValue ?? 1),
|
||||
difficultyChoices:SYSTEM.DIFFICULTY_CHOICES,
|
||||
moonPhaseChoices: SYSTEM.MOON_DICE_PHASES,
|
||||
defaultDifficulty:options.difficulty ?? "normal",
|
||||
@@ -135,25 +137,33 @@ export class CelestopolRoll extends Roll {
|
||||
}
|
||||
|
||||
async _getChatCardData(isPrivate) {
|
||||
const statLabel = this.options.statLabel
|
||||
const skillLabel = this.options.skillLabel
|
||||
const resultType = this.resultType
|
||||
const diceResults = this.dice[0]?.results?.map(r => r.result) ?? []
|
||||
|
||||
return {
|
||||
css: [SYSTEM.id, "dice-roll"],
|
||||
cssClass: [SYSTEM.id, "dice-roll"].join(" "),
|
||||
actorId: this.actorId,
|
||||
actingCharName: this.actorName,
|
||||
actingCharImg: this.actorImage,
|
||||
skillLabel: this.skillLabel,
|
||||
actorName: this.actorName,
|
||||
actorImg: this.actorImage,
|
||||
statLabel: statLabel ? game.i18n.localize(statLabel) : "",
|
||||
skillLabel: skillLabel ? game.i18n.localize(skillLabel) : "",
|
||||
formula: this.formula,
|
||||
total: this.total,
|
||||
resultType: this.resultType,
|
||||
isSuccess: this.isSuccess,
|
||||
isFailure: this.isFailure,
|
||||
resultType,
|
||||
resultClass: resultType === "success" ? "success" : resultType === "failure" ? "failure" : "",
|
||||
success: this.isSuccess,
|
||||
failure: this.isFailure,
|
||||
difficulty: this.options.difficulty,
|
||||
difficultyValue:this.options.difficultyValue,
|
||||
difficultyLabel:game.i18n.localize(SYSTEM.DIFFICULTY_CHOICES[this.options.difficulty]?.label ?? ""),
|
||||
moonPhase: this.options.moonPhase,
|
||||
moonPhaseLabel: game.i18n.localize(SYSTEM.MOON_DICE_PHASES[this.options.moonPhase]?.label ?? ""),
|
||||
moonBonus: this.moonBonus,
|
||||
modifier: this.options.modifier,
|
||||
isPrivate,
|
||||
tooltip: isPrivate ? "" : await this.getTooltip(),
|
||||
results: this.dice[0]?.results ?? [],
|
||||
diceResults,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user