From 778585171964b4900e6f55344b5ac7aaa8a3f4f1 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 19 Sep 2022 20:15:37 +0200 Subject: [PATCH 1/8] =?UTF-8?q?Log=20de=20l'actor=20dont=20les=20sorts=20s?= =?UTF-8?q?ont=20migr=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/migrations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/migrations.js b/module/migrations.js index 9bd75d62..ff80f7ba 100644 --- a/module/migrations.js +++ b/module/migrations.js @@ -16,7 +16,7 @@ class _10_0_16_MigrationSortsReserve extends Migration { .filter((actor) => actor.system.reve?.reserve?.list?.length ?? 0 > 0) .forEach(async (actor) => { const sortsReserve = actor.system.reve.reserve.list.map(this.conversionSortReserve); - console.log(LOG_HEAD + "Migration des sorts ", sortsReserve); + console.log(`${LOG_HEAD} Migration des sorts en réserve de ${actor.name}`, sortsReserve); await actor.createEmbeddedDocuments("Item", sortsReserve, { renderSheet: false, }); From 43d097581e6d8f5257ba05127e05e673f544be8b Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 19 Sep 2022 20:16:16 +0200 Subject: [PATCH 2/8] Log de l'acteur avec monnaies manquantes --- module/actor.js | 2 +- module/item-monnaie.js | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/module/actor.js b/module/actor.js index 33a3055a..41ab10a5 100644 --- a/module/actor.js +++ b/module/actor.js @@ -197,7 +197,7 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ async checkMonnaiePresence() { // Ajout opportuniste si les pièces n'existent pas. if (!this.items) return; // Sanity check during import - let manquantes = Monnaie.monnaiesManquantes(this.itemTypes['monnaie']); + let manquantes = Monnaie.monnaiesManquantes(this); if (manquantes.length > 0) { await this.createEmbeddedDocuments('Item', manquantes, { renderSheet: false }); } diff --git a/module/item-monnaie.js b/module/item-monnaie.js index 077d4d2a..df3e2454 100644 --- a/module/item-monnaie.js +++ b/module/item-monnaie.js @@ -1,4 +1,5 @@ import { Misc } from "./misc.js"; +import { LOG_HEAD, SYSTEM_RDD } from "./constants.js"; const MONNAIES_STANDARD = [ { @@ -41,14 +42,11 @@ export class Monnaie { return MONNAIES_STANDARD; } - static filtrerMonnaies(items) { - return items.filter(it => it.type == 'monnaie'); - } - - static monnaiesManquantes(disponibles) { + static monnaiesManquantes(actor) { + const disponibles = actor.itemTypes['monnaie']; const manquantes = MONNAIES_STANDARD.filter(standard => !disponibles.find(disponible => Monnaie.deValeur(disponible, standard.system?.valeur_deniers))); if (manquantes.length > 0) { - console.error('monnaiesManquantes', manquantes, ' avec monnaies', disponibles, MONNAIES_STANDARD); + console.error(`${LOG_HEAD} monnaiesManquantes pour ${actor.name}`, manquantes, ' avec monnaies', disponibles, MONNAIES_STANDARD); } return manquantes; } From 5402508b26de83a9d7490baeaa57fb091b5534f4 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 20 Sep 2022 00:13:25 +0200 Subject: [PATCH 3/8] =?UTF-8?q?Le=20"label=20for"=20indique=20le=20"name"?= =?UTF-8?q?=20du=20contr=C3=B4le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/calendar-editor-template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/calendar-editor-template.html b/templates/calendar-editor-template.html index e28f019a..5187c8b9 100644 --- a/templates/calendar-editor-template.html +++ b/templates/calendar-editor-template.html @@ -34,7 +34,7 @@
- + + +
+
+ + +
- - + +
+ {{#unless system.ispossession}}
- - -
-
- - -
-
- - -
-
- - -
+ + + + {{#if system.iscombat}} +
+ + +
+
+ + +
+ {{/if}} +
+ + +
+ {{/unless}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}