From 3b269b2baa98b1d4bee8a77ed279b15d27c8833b Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 9 Mar 2024 19:12:57 +0100 Subject: [PATCH 01/10] Simplifications --- module/actor.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/module/actor.js b/module/actor.js index 7f33f5a4..7cdcf1d7 100644 --- a/module/actor.js +++ b/module/actor.js @@ -99,21 +99,19 @@ export class RdDActor extends RdDBaseActorSang { isHautRevant() { return this.system.attributs.hautrevant.value != "" } /* -------------------------------------------- */ - getAgilite() { return Number(this.system.carac.agilite?.value ?? 0) } - getChance() { return Number(this.system.carac.chance?.value ?? 0) } + getAgilite() { return this.system.carac.agilite?.value ?? 0 } + getChance() { return this.system.carac.chance?.value ?? 0 } - getReveActuel() { return Misc.toInt(this.system.reve?.reve?.value ?? this.carac.reve.value) } - getChanceActuel() { return Misc.toInt(this.system.compteurs.chance?.value ?? 10) } - getMoralTotal() { return Number(this.system.compteurs.moral?.value ?? 0) } + getReveActuel() { return this.system.reve?.reve?.value ?? this.carac.reve.value ?? 0 } + getChanceActuel() { return this.system.compteurs.chance?.value ?? 10 } + getMoralTotal() { return this.system.compteurs.moral?.value ?? 0 } /* -------------------------------------------- */ getEtatGeneral(options = { ethylisme: false }) { - const etatGeneral = Misc.toInt(this.system.compteurs.etat?.value) - if (options.ethylisme) { - // Pour les jets d'Ethylisme, on retire le malus d'éthylisme (p.162) - return etatGeneral - this.malusEthylisme() - } - return etatGeneral + const etatGeneral = this.system.compteurs.etat?.value ?? 0 + // Pour les jets d'Ethylisme, on retire le malus d'éthylisme (p.162) + const annuleMalusEthylisme = options.ethylisme ? this.malusEthylisme() : 0 + return etatGeneral - annuleMalusEthylisme } /* -------------------------------------------- */ From bc169d931bf5765f96998b687c8078f616250562 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 9 Mar 2024 19:38:53 +0100 Subject: [PATCH 02/10] Fix: log erreur TMR en mode visu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit En mode visualisation, les informations du personnage ne sont pas affichées --- module/rdd-tmr-dialog.js | 5 +-- templates/dialog-tmr.html | 81 +++++++++++++++++++-------------------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index bfd3cc96..9a12ebd2 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -298,13 +298,12 @@ export class RdDTMRDialog extends Dialog { /* -------------------------------------------- */ async updateValuesDisplay() { - if (!this.rendered) { + if (this.viewOnly || !this.rendered) { return; } const coord = this._getCoordActor(); - HtmlUtility.showControlWhen(this.html.find(".lire-signe-draconique"), this.actor.isResonanceSigneDraconique(coord)); - + let ptsreve = document.getElementById("tmr-pointsreve-value"); ptsreve.innerHTML = this.actor.system.reve.reve.value; diff --git a/templates/dialog-tmr.html b/templates/dialog-tmr.html index 3b89000d..b1a5dc44 100644 --- a/templates/dialog-tmr.html +++ b/templates/dialog-tmr.html @@ -21,49 +21,48 @@ {{else}} {{#if (and isGM hasPlayerOwner)}} -
-

Le gardien gére les TMR du joueur, le joueur ne peut pas monter dans les TMR!

-
+
+

Le gardien gére les TMR du joueur, le joueur ne peut pas monter dans les TMR!

+
{{/if}} -
- - - -
-
- 0 -
-
- - - -
- - -
-
- -
-
- 0 -
-
- 0 -
-
- 0 -
-
- Fatigue - {{{fatigue.html}}} -
+
+ + + +
+
+ 0 +
+
+ + + +
+ + +
+
+ +
+
+ 0 +
+
+ 0 +
+
+ 0 +
+
+ Fatigue + {{{fatigue.html}}} +
{{/if}} -
-
+
From d34fde2ba4a121359b535d97d148b61d9fffc6ec Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 9 Mar 2024 19:48:53 +0100 Subject: [PATCH 03/10] Fix: titre des feuilles d'objets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suite à la correction de l'ordre et du nom dans la fenêtre de création, les titres étaient incorrects (TYPES.Item.Tache par exemple) --- module/misc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/misc.js b/module/misc.js index 10edee27..5f4d6fad 100644 --- a/module/misc.js +++ b/module/misc.js @@ -46,7 +46,7 @@ export class Misc { } static typeName(type, subType) { - return subType ? game.i18n.localize(`TYPES.${type}.${Misc.upperFirst(subType)}`) + return subType ? game.i18n.localize(`TYPES.${type}.${subType}`) : ''; } From 6dbf322efef11fea1522aadc20c71638b9f38aa9 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 9 Mar 2024 19:49:31 +0100 Subject: [PATCH 04/10] Fix: traduction tooltip Ediot/Delete --- templates/actor/alchimie.html | 4 ++-- templates/actor/chirurgie.html | 4 ++-- templates/actor/combat.html | 4 ++-- templates/actor/comp-creature.html | 4 ++-- templates/actor/comp-possession.html | 4 ++-- templates/actor/dragon-queue.html | 2 +- templates/actor/dragon-souffles.html | 2 +- templates/actor/dragon-tetes.html | 2 +- templates/actor/jeux.html | 4 ++-- templates/actor/oeuvre.html | 4 ++-- templates/actor/taches.html | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/templates/actor/alchimie.html b/templates/actor/alchimie.html index 9b8741ac..2fd9399e 100644 --- a/templates/actor/alchimie.html +++ b/templates/actor/alchimie.html @@ -4,8 +4,8 @@ {{#each (trier recettesAlchimiques) as |recette id|}}
  • {{recette.name}}
    - - + +
  • {{/each}} diff --git a/templates/actor/chirurgie.html b/templates/actor/chirurgie.html index 76ed8a4b..16797573 100644 --- a/templates/actor/chirurgie.html +++ b/templates/actor/chirurgie.html @@ -13,8 +13,8 @@ {{tache.name}} ({{tache.system.points_de_tache_courant}}/{{tache.system.points_de_tache}})
    - - + +
    {{/if}} diff --git a/templates/actor/combat.html b/templates/actor/combat.html index f7909763..f9ec0ac2 100644 --- a/templates/actor/combat.html +++ b/templates/actor/combat.html @@ -64,8 +64,8 @@ {{emp.system.pointsemp}}
    - - + +
    {{/each}} diff --git a/templates/actor/comp-creature.html b/templates/actor/comp-creature.html index a51f4b3f..54c3a519 100644 --- a/templates/actor/comp-creature.html +++ b/templates/actor/comp-creature.html @@ -23,8 +23,8 @@ /> {{#if @root.options.vueDetaillee}}
    - - + +
    {{/if}} diff --git a/templates/actor/comp-possession.html b/templates/actor/comp-possession.html index 69382805..c82d584a 100644 --- a/templates/actor/comp-possession.html +++ b/templates/actor/comp-possession.html @@ -6,8 +6,8 @@ {{possession.name}}
    - - + +
    {{/each}} diff --git a/templates/actor/dragon-queue.html b/templates/actor/dragon-queue.html index 5bf3ad82..39990c91 100644 --- a/templates/actor/dragon-queue.html +++ b/templates/actor/dragon-queue.html @@ -8,7 +8,7 @@ {{queue.name}}
    - + {{#if queue.system.refoulement}} Refouler {{/if}} diff --git a/templates/actor/dragon-souffles.html b/templates/actor/dragon-souffles.html index 7b8ac6f6..4bbff132 100644 --- a/templates/actor/dragon-souffles.html +++ b/templates/actor/dragon-souffles.html @@ -6,7 +6,7 @@ {{souffle.name}}
    - +
    {{/each}} diff --git a/templates/actor/dragon-tetes.html b/templates/actor/dragon-tetes.html index af43979c..5a00853d 100644 --- a/templates/actor/dragon-tetes.html +++ b/templates/actor/dragon-tetes.html @@ -6,7 +6,7 @@ {{tete.name}}
    - +
    {{/each}} diff --git a/templates/actor/jeux.html b/templates/actor/jeux.html index 1ef0c99c..017a6c06 100644 --- a/templates/actor/jeux.html +++ b/templates/actor/jeux.html @@ -5,8 +5,8 @@
  • {{jeu.name}} (base {{jeu.system.base}})
    - - + +
  • {{/each}} diff --git a/templates/actor/oeuvre.html b/templates/actor/oeuvre.html index 3e001bb2..174aaa77 100644 --- a/templates/actor/oeuvre.html +++ b/templates/actor/oeuvre.html @@ -5,8 +5,8 @@ {{oeuvre.name}} (niveau {{oeuvre.system.niveau}})
    - - + +
    diff --git a/templates/actor/taches.html b/templates/actor/taches.html index 3e1182ee..8f9316f5 100644 --- a/templates/actor/taches.html +++ b/templates/actor/taches.html @@ -9,8 +9,8 @@ (or @root.options.isGM (not tache.system.cacher_points_de_tache)) }}/{{tache.system.points_de_tache}}{{/if}})
    - - + +
    {{/unless}} From dde3011f1ddfc23ee4b0ed799e4e73dafaa6cff9 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 9 Mar 2024 19:50:00 +0100 Subject: [PATCH 05/10] =?UTF-8?q?Fix:=20Checkbox=20cacher=20les=20points?= =?UTF-8?q?=20de=20t=C3=A2che?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/item-tache-sheet.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/item-tache-sheet.html b/templates/item-tache-sheet.html index 7b479f0b..a96ae761 100644 --- a/templates/item-tache-sheet.html +++ b/templates/item-tache-sheet.html @@ -36,7 +36,7 @@ {{#if options.isGM}}
    - +
    From 6414f76d676d043b23bb803a54b307e83c4853d2 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 9 Mar 2024 23:12:13 +0100 Subject: [PATCH 06/10] =?UTF-8?q?Fix:=20ignorer=20personnages=20joueurs=20?= =?UTF-8?q?non=20li=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pour les fenêtres de stress/repos/voyage/astrologie, ignorer les personnages non liés (par exemple, un guerrier sorde) --- module/actor.js | 4 ++++ module/actor/base-actor.js | 2 ++ module/actor/experience-log.js | 2 +- module/rdd-commands.js | 7 +++---- module/sommeil/app-astrologie.js | 2 +- module/sommeil/dialog-chateau-dormant.js | 4 +--- module/sommeil/dialog-stress.js | 2 +- module/voyage/dialog-fatigue-voyage.js | 5 ++--- 8 files changed, 15 insertions(+), 13 deletions(-) diff --git a/module/actor.js b/module/actor.js index 7cdcf1d7..9b2ae3f2 100644 --- a/module/actor.js +++ b/module/actor.js @@ -95,6 +95,10 @@ export class RdDActor extends RdDBaseActorSang { return ![TYPES.competencecreature, TYPES.tarot, TYPES.service].includes(item.type) } + isPersonnageJoueur() { + return this.hasPlayerOwner && this.prototypeToken.actorLink + } + isPersonnage() { return true } isHautRevant() { return this.system.attributs.hautrevant.value != "" } diff --git a/module/actor/base-actor.js b/module/actor/base-actor.js index 2cd4f79c..acc22ee4 100644 --- a/module/actor/base-actor.js +++ b/module/actor/base-actor.js @@ -85,6 +85,8 @@ export class RdDBaseActor extends Actor { return game.actors.get(actorId) } + isPersonnageJoueur() { return false } + static extractActorMin = (actor) => { return { id: actor?.id, type: actor?.type, name: actor?.name, img: actor?.img }; }; static getParentActor(document) { diff --git a/module/actor/experience-log.js b/module/actor/experience-log.js index 2d60ed9e..ad282e78 100644 --- a/module/actor/experience-log.js +++ b/module/actor/experience-log.js @@ -12,7 +12,7 @@ export const XP_TOPIC = { export class ExperienceLog { static async add(actor, topic, from, to, raison, manuel = false) { - if (!actor.hasPlayerOwner || !actor.isPersonnage()) { + if (!actor.isPersonnageJoueur()) { return } if (from == to) { diff --git a/module/rdd-commands.js b/module/rdd-commands.js index fdf88956..88b08dc3 100644 --- a/module/rdd-commands.js +++ b/module/rdd-commands.js @@ -463,14 +463,13 @@ export class RdDCommands { let motif = params.slice(1, params.length - 2); let name = params[params.length - 1]; + const personnages = game.actors.filter(actor => actor.isPersonnageJoueur()); if (name == undefined) { - for (let actor of game.actors) { - // TODO: ne plus stresser les entités de cauchemar! + for (let actor of personnages) { await actor.distribuerStress('stress', stress, motif); } } else { - //console.log(stressValue, nomJoueur); - let actor = Misc.findActor(name, game.actors.filter(it => it.hasPlayerOwner)) ?? Misc.findPlayer(name)?.character + let actor = Misc.findActor(name, personnages) ?? Misc.findPlayer(name)?.character if (actor) { await actor.distribuerStress('stress', stress, motif); } diff --git a/module/sommeil/app-astrologie.js b/module/sommeil/app-astrologie.js index d993eaf7..bd09f0ed 100644 --- a/module/sommeil/app-astrologie.js +++ b/module/sommeil/app-astrologie.js @@ -85,7 +85,7 @@ export class AppAstrologie extends Application { const nbAstral = calendrier.getNombreAstral() const heures = RdDTimestamp.heures(); return { - ajustementsActors: game.actors.filter(it => it.isPersonnage() && it.hasPlayerOwner) + ajustementsActors:game.actors.filter(actor => actor.isPersonnageJoueur()) .map(actor => this.getAjustementActor(actor, nbAstral, heures)), nombresAstraux: calendrier.getNombresAstraux().map(na => this.getDetailNombreAstral(na)) } diff --git a/module/sommeil/dialog-chateau-dormant.js b/module/sommeil/dialog-chateau-dormant.js index 49faa706..0a928e29 100644 --- a/module/sommeil/dialog-chateau-dormant.js +++ b/module/sommeil/dialog-chateau-dormant.js @@ -3,10 +3,8 @@ export class DialogChateauDormant extends Dialog { static async create() { const date = game.system.rdd.calendrier.dateCourante(); - const actors = game.actors.filter(actor => actor.hasPlayerOwner && actor.isPersonnage()); - const dialogData = { - actors: actors, + actors: game.actors.filter(actor => actor.isPersonnageJoueur()), date: date, motifStress: `Nuit du ${date}`, finChateauDormant: game.system.rdd.calendrier.getTimestampFinChateauDormant() diff --git a/module/sommeil/dialog-stress.js b/module/sommeil/dialog-stress.js index fd413798..1a6502f2 100644 --- a/module/sommeil/dialog-stress.js +++ b/module/sommeil/dialog-stress.js @@ -6,7 +6,7 @@ export class DialogStress extends Dialog { motif: "Motif", stress: 10, immediat: false, - actors: game.actors.filter(actor => actor.hasPlayerOwner && actor.isPersonnage()) + actors: game.actors.filter(actor => actor.isPersonnageJoueur()) .map(actor => ({ id: actor.id, name: actor.name, diff --git a/module/voyage/dialog-fatigue-voyage.js b/module/voyage/dialog-fatigue-voyage.js index a874d1fc..d8bfde69 100644 --- a/module/voyage/dialog-fatigue-voyage.js +++ b/module/voyage/dialog-fatigue-voyage.js @@ -33,11 +33,10 @@ export class DialogFatigueVoyage extends Dialog { return } if (!DialogFatigueVoyage.dialog) { - const playerActors = game.actors.filter(actor => actor.hasPlayerOwner && actor.isPersonnage()) - .map(actor => DialogFatigueVoyage.prepareActor(actor)) const parameters = { tableauFatigueMarche: TABLEAU_FATIGUE_MARCHE, - playerActors: playerActors, + playerActors: game.actors.filter(actor => actor.isPersonnageJoueur()) + .map(actor => DialogFatigueVoyage.prepareActor(actor)), nombreHeures: 1, } DialogFatigueVoyage.setModeDeplacement(parameters, undefined, undefined) From b0e28ef937e602f20cab04d5c88ea1e0c1481bf2 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 10 Mar 2024 00:10:45 +0100 Subject: [PATCH 07/10] Fix: labels for / id - Ajout de "for" sur labels - suppression d'id inutiles - corrections de for="xp" incorrects - simplification css alchimie-title/blessure-title --- styles/simple.css | 5 +--- templates/actor/maladies-poisons.html | 2 +- templates/actor/possessions.html | 2 +- templates/item-arme-sheet.html | 8 +++--- templates/item-casetmr-sheet.html | 4 +-- templates/item-chant-sheet.html | 4 +-- templates/item-competencecreature-sheet.html | 4 +-- templates/item-conteneur-sheet.html | 2 +- templates/item-danse-sheet.html | 10 ++++---- templates/item-empoignade-sheet.html | 2 +- templates/item-gemme-sheet.html | 4 +-- templates/item-jeu-sheet.html | 10 ++++---- templates/item-livre-sheet.html | 20 +++++++-------- templates/item-meditation-sheet.html | 26 ++++++++++---------- templates/item-musique-sheet.html | 5 ++-- templates/item-nombreastral-sheet.html | 9 +++---- templates/item-oeuvre-sheet.html | 12 ++++----- templates/item-possession-sheet.html | 6 ++--- templates/item-potion-sheet.html | 2 +- templates/item-recettealchimique-sheet.html | 10 ++++---- templates/item-sort-sheet.html | 8 +++--- templates/item-sortreserve-sheet.html | 4 +-- templates/item-tarot-sheet.html | 6 ++--- 23 files changed, 80 insertions(+), 85 deletions(-) diff --git a/styles/simple.css b/styles/simple.css index d13871b1..69cecd34 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1315,10 +1315,7 @@ div.competence-column div.categorie-competence{ margin-right: 0.2rem; margin-left: 0.2rem; } -.blessures-title { - font-weight: bold; -} -.alchimie-title { +.item-label { font-weight: bold; } .pointsreve-value { diff --git a/templates/actor/maladies-poisons.html b/templates/actor/maladies-poisons.html index 91dd9aac..a97fa240 100644 --- a/templates/actor/maladies-poisons.html +++ b/templates/actor/maladies-poisons.html @@ -1,5 +1,5 @@ {{#if maladiesPoisons.length}} -

    Maladies & Poisons:

    +

    Maladies & Poisons:

    • Nom diff --git a/templates/actor/possessions.html b/templates/actor/possessions.html index 150407bb..f81dee00 100644 --- a/templates/actor/possessions.html +++ b/templates/actor/possessions.html @@ -1,6 +1,6 @@ {{#if possessions.length}} {{!-- Possession --}} -

      Possession:

      +

      Possession:

      • Nom diff --git a/templates/item-arme-sheet.html b/templates/item-arme-sheet.html index 74e0c45c..5842ae3d 100644 --- a/templates/item-arme-sheet.html +++ b/templates/item-arme-sheet.html @@ -8,7 +8,7 @@
        - {{#select system.competence}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.html" categorie='melee'}} @@ -26,7 +26,7 @@
        - {{#select system.tir}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.html" categorie='tir'}} @@ -52,7 +52,7 @@
        - {{#select system.categorie_parade}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-parade.html"}} {{/select}} @@ -104,7 +104,7 @@
        - {{#select system.initpremierround}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-initpremierround.html"}} {{/select}} diff --git a/templates/item-casetmr-sheet.html b/templates/item-casetmr-sheet.html index e692e464..b198701b 100644 --- a/templates/item-casetmr-sheet.html +++ b/templates/item-casetmr-sheet.html @@ -7,8 +7,8 @@
        - - {{#select system.specific}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-tmr-effet.html"}} {{/select}} diff --git a/templates/item-chant-sheet.html b/templates/item-chant-sheet.html index 7fbd9714..dfb9dc77 100644 --- a/templates/item-chant-sheet.html +++ b/templates/item-chant-sheet.html @@ -3,11 +3,11 @@ {{!-- Sheet Body --}}
        - +
        - +
        diff --git a/templates/item-competencecreature-sheet.html b/templates/item-competencecreature-sheet.html index e68571fa..0af9b008 100644 --- a/templates/item-competencecreature-sheet.html +++ b/templates/item-competencecreature-sheet.html @@ -38,8 +38,8 @@ {{/if}} {{#if isparade}}
        - - {{#select system.categorie_parade}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-parade.html"}} {{/select}} diff --git a/templates/item-conteneur-sheet.html b/templates/item-conteneur-sheet.html index 6a9f3243..0d337d6b 100644 --- a/templates/item-conteneur-sheet.html +++ b/templates/item-conteneur-sheet.html @@ -9,7 +9,7 @@
        - +
        {{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}} diff --git a/templates/item-danse-sheet.html b/templates/item-danse-sheet.html index 59e0f358..5232a7fb 100644 --- a/templates/item-danse-sheet.html +++ b/templates/item-danse-sheet.html @@ -3,7 +3,7 @@ {{!-- Sheet Body --}}
        - +
        - +
        - +
        - +
        - +
        diff --git a/templates/item-empoignade-sheet.html b/templates/item-empoignade-sheet.html index aff87868..220931c4 100644 --- a/templates/item-empoignade-sheet.html +++ b/templates/item-empoignade-sheet.html @@ -3,7 +3,7 @@ {{!-- Sheet Body --}}
        - +
        {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}} diff --git a/templates/item-gemme-sheet.html b/templates/item-gemme-sheet.html index b13fc670..85fa2dad 100644 --- a/templates/item-gemme-sheet.html +++ b/templates/item-gemme-sheet.html @@ -7,8 +7,8 @@
        - - {{#select system.type}} {{{gemmeTypeList}}} {{/select}} diff --git a/templates/item-jeu-sheet.html b/templates/item-jeu-sheet.html index e562b5c1..efad7fed 100644 --- a/templates/item-jeu-sheet.html +++ b/templates/item-jeu-sheet.html @@ -4,26 +4,26 @@ {{!-- Sheet Body --}}
        - +
        - +
        - +
        - +
        diff --git a/templates/item-livre-sheet.html b/templates/item-livre-sheet.html index 73847be6..12015e12 100644 --- a/templates/item-livre-sheet.html +++ b/templates/item-livre-sheet.html @@ -5,9 +5,9 @@

        {{#if options.isOwned}} - {{/if}} + {{/if}}

      {{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queues.html"}} From 84ea3a6ea9da014aa234e77e53967438c5745107 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 10 Mar 2024 00:47:50 +0100 Subject: [PATCH 09/10] Fix: TMR qui ne s'affichent pas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Après un certain temps (changements de scènes?), les TMR ne s'affichaient plus correctement. Tentative de forcer le chargement des textures manquantes lors de l'ouverture de la fenêtre de TMR. --- module/rdd-tmr-dialog.js | 5 ++--- module/tmr/pixi-tmr.js | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index 9a12ebd2..4e497720 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -44,16 +44,15 @@ export class RdDTMRDialog extends Dialog { type: Number, range: TMR_DISPLAY_SIZE.range }) - await PixiTMR.init() } static async create(actor, tmrData) { + await PixiTMR.init() let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html', tmrData); - if (tmrData.mode != 'visu' && !game.user.isGM) { ChatMessage.create({ content: actor.name + " est monté dans les TMR en mode : " + tmrData.mode, whisper: ChatMessage.getWhisperRecipients("GM") }); } - return new RdDTMRDialog(html, actor, tmrData); + return new RdDTMRDialog(html, actor, tmrData) } /* -------------------------------------------- */ diff --git a/module/tmr/pixi-tmr.js b/module/tmr/pixi-tmr.js index ce0f32de..781e138b 100644 --- a/module/tmr/pixi-tmr.js +++ b/module/tmr/pixi-tmr.js @@ -1,4 +1,3 @@ -import { SYSTEM_RDD } from "../constants.js"; import { Misc } from "../misc.js"; import { TMRConstants, tmrTokenZIndex } from "../tmr-constants.js"; import { TMRUtility } from "../tmr-utility.js"; @@ -14,12 +13,12 @@ export class PixiTMR { static register(name, img) { PixiTMR.textures[name] = img; } + static async init() { await Promise.all( Object.values(PixiTMR.textures) - .filter(img => img != undefined) - .map(async img => PIXI.Sprite.from(await PIXI.Assets.load(img))) - ) + .filter(img => img != undefined && !PIXI.utils.TextureCache[img]) + .map(async img => PIXI.Sprite.from(await PIXI.Assets.load(img)))) } constructor(tmrDialog, displaySize) { @@ -106,8 +105,9 @@ export class PixiTMR { sprite(code, options = {}) { let img = PixiTMR.getImgFromCode(code) - const texture = PIXI.utils.TextureCache[img] + let texture = PIXI.utils.TextureCache[img] if (!texture) { + // TODO: charger la texture console.error("Texture manquante", code, PIXI.utils.TextureCache) return; } From 7969e74c8d2df4e4e7e8447d518f64872677ed7e Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 10 Mar 2024 00:53:45 +0100 Subject: [PATCH 10/10] Version 11.2.17 --- changelog.md | 9 ++++++++- system.json | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 6ee771d3..25556b34 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,13 @@ # 11.2 +## 11.2.17 - Le cache-oeil d'Akarlikarlikar +- Le titre des fenêtre d'objet affiche de nouveau le type traduit +- Les tooltips des boutons edit/delete sont maintenant en Français +- La case à cocher "Cacher les points de tâches" fonctionne de nouveau +- Les personnages non-liés ne sont plus dans les liste de personnages joueurs pour le repos, le stress, la fatigue +- L'utilisation de Thanatos est visible dans l'onglet Haut-Rêve pour indiquer que la prochaine queue est une ombre +- La fenêtre des TMRs ne devrait plus afficher une zone noire au lieu de la carte. -## 11.2.16 - La Tri d'Akarlikarlikar +## 11.2.16 - Le Tri d'Akarlikarlikar - Tri alphabétique des items dans la fenêtre de création - Mise à jour comptage de monde diff --git a/system.json b/system.json index 3035c75e..5c0eab1a 100644 --- a/system.json +++ b/system.json @@ -1,8 +1,8 @@ { "id": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", - "version": "11.2.16", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.2.16.zip", + "version": "11.2.17", + "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.2.17.zip", "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json", "changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md", "compatibility": {