From 450cb8e8998d902732dd448656809e74b82db006 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 10 Dec 2022 15:44:08 +0100 Subject: [PATCH 1/8] =?UTF-8?q?Largeur=20des=20comp=C3=A9tences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajustement de la largeur des colonnes de compétenes en vue simplifiée Déplacement de l'en-tête dans la première ligne de la liste (avec les boutons en vue détaillée) --- styles/simple.css | 3 +++ templates/actor/competence-categorie.html | 16 +++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/styles/simple.css b/styles/simple.css index 724bb2eb..d7658f6d 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1011,6 +1011,9 @@ ul.list-item-margin6 li { flex-grow: 0; flex-basis: 1; } +div.competence-column div.categorie-competence{ + width: 100%; +} .competence-header { align-content: flex-start; justify-content: flex-start; diff --git a/templates/actor/competence-categorie.html b/templates/actor/competence-categorie.html index c243de13..8c1e8122 100644 --- a/templates/actor/competence-categorie.html +++ b/templates/actor/competence-categorie.html @@ -1,12 +1,13 @@ {{#if competences}} -
-
- {{categorie}} -
+
    - {{#if @root.options.vueDetaillee}}
  • - + +
    + {{categorie}} +
    +
    + {{#if @root.options.vueDetaillee}} Niv. xp {{#if (eq categorie 'Draconic')}} @@ -20,11 +21,12 @@ {{/if}}
+ {{/if}} - {{/if}} {{#each competences as |comp key|}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence.html" comp}} {{/each}} +
  • {{/if}} From f6d42875ae105f0ebbed344c4e9e64b442b9101b Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 10 Dec 2022 15:49:09 +0100 Subject: [PATCH 2/8] =?UTF-8?q?Stress=20et=20arch=C3=A9type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Déplacement du stress et de l'archétype avant les compétences Les lignes d'archétypes totalement réparties disparaissent --- module/item-competence.js | 43 ++++++++++++++--------------- templates/actor-sheet.html | 7 ++--- templates/actor/xp-competences.html | 33 +++++++++++++--------- 3 files changed, 43 insertions(+), 40 deletions(-) diff --git a/module/item-competence.js b/module/item-competence.js index 13b7de41..8772c75b 100644 --- a/module/item-competence.js +++ b/module/item-competence.js @@ -8,18 +8,18 @@ const xp_par_niveau = [5, 5, 5, 10, 10, 10, 10, 15, 15, 15, 15, 20, 20, 20, 20, const niveau_max = xp_par_niveau.length - 10; /* -------------------------------------------- */ const limitesArchetypes = [ - { "niveau": 0, "nombreMax": 100, "nombre": 0 }, - { "niveau": 1, "nombreMax": 10, "nombre": 0 }, - { "niveau": 2, "nombreMax": 9, "nombre": 0 }, - { "niveau": 3, "nombreMax": 8, "nombre": 0 }, - { "niveau": 4, "nombreMax": 7, "nombre": 0 }, - { "niveau": 5, "nombreMax": 6, "nombre": 0 }, - { "niveau": 6, "nombreMax": 5, "nombre": 0 }, - { "niveau": 7, "nombreMax": 4, "nombre": 0 }, - { "niveau": 8, "nombreMax": 3, "nombre": 0 }, - { "niveau": 9, "nombreMax": 2, "nombre": 0 }, - { "niveau": 10, "nombreMax": 1, "nombre": 0 }, - { "niveau": 11, "nombreMax": 1, "nombre": 0 } + { "niveau": 0, "nombreMax": 100, "reste": 100 }, + { "niveau": 1, "nombreMax": 10, "reste": 10 }, + { "niveau": 2, "nombreMax": 9, "reste": 9 }, + { "niveau": 3, "nombreMax": 8, "reste": 8 }, + { "niveau": 4, "nombreMax": 7, "reste": 7 }, + { "niveau": 5, "nombreMax": 6, "reste": 6 }, + { "niveau": 6, "nombreMax": 5, "reste": 5 }, + { "niveau": 7, "nombreMax": 4, "reste": 4 }, + { "niveau": 8, "nombreMax": 3, "reste": 3 }, + { "niveau": 9, "nombreMax": 2, "reste": 2 }, + { "niveau": 10, "nombreMax": 1, "reste": 1 }, + { "niveau": 11, "nombreMax": 1, "reste": 1 } ]; /* -------------------------------------------- */ @@ -267,23 +267,20 @@ export class RdDItemCompetence extends Item { /* -------------------------------------------- */ static computeResumeArchetype(competences) { - const archetype = RdDItemCompetence.getLimitesArchetypes(); + const computed = duplicate(limitesArchetypes); competences.map(it => Math.max(0, it.system.niveau_archetype)) - .forEach(niveau => { - archetype[niveau] = archetype[niveau] ?? { "niveau": niveau, "nombreMax": 0, "nombre": 0 }; - archetype[niveau].nombre = (archetype[niveau]?.nombre ?? 0) + 1; + .filter(n => n > 0) + .forEach(n => { + computed[n] = computed[n] ?? { niveau: n, nombreMax: 0, reste: 0 }; + computed[n].reste = computed[n].reste - 1; }); - return archetype; + return computed.filter(it => it.reste > 0 && it.niveau > 0); } /* -------------------------------------------- */ - static getLimitesArchetypes() { - return duplicate(limitesArchetypes); - } - static triVisible(competences) { return competences.filter(it => it.system.isVisible) - .sort((a, b) => RdDItemCompetence.compare(a,b)) + .sort((a, b) => RdDItemCompetence.compare(a, b)) } static $positionTri(comp) { @@ -308,7 +305,7 @@ export class RdDItemCompetence extends Item { return 0; } - static compare(a,b) { + static compare(a, b) { const diff = RdDItemCompetence.$positionTri(a) - RdDItemCompetence.$positionTri(b); return diff ? diff : a.name.localeCompare(b.name); } diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 17d4d1ae..e47d27e8 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -66,13 +66,13 @@
    -
    +
    {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.generale) categorie="Compétences générales"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.particuliere) categorie="Compétences Particulières"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.specialisee) categorie="Compétences Spécialisées"}}
    - -
    +
    + {{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-competences.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.melee) categorie="Compétences de Mêlée"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.tir) categorie="Compétences de Tir"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.lancer) categorie="Compétences de Lancer"}} @@ -80,7 +80,6 @@ {{#if (or system.attributs.hautrevant.value options.vueDetaillee)}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.draconic) categorie="Draconic"}} {{/if}} - {{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-competences.html"}}
    diff --git a/templates/actor/xp-competences.html b/templates/actor/xp-competences.html index 28720100..fa6f29e0 100644 --- a/templates/actor/xp-competences.html +++ b/templates/actor/xp-competences.html @@ -1,23 +1,30 @@
    • - Stress transformé - + + {{#if options.vueDetaillee}} + + {{else}} + + {{/if}}
    • - + {{#if options.vueDetaillee}}
    • Total XP compétences {{calc.competenceXPTotal}}
    • - {{#if options.vueDetaillee}} -
    • Niveaux d'archétype à répartir
    • - {{#each calc.comptageArchetype as |archetype key|}} - {{#if (lt archetype.nombre archetype.nombreMax)}} -
    • - -
    • - {{/if}} - {{/each}} - {{/if}} + {{#if calc.comptageArchetype}} +

    • +
    • Niveaux d'archétype à répartir
    • + {{#each calc.comptageArchetype as |archetype key|}} + {{#if (gt archetype.reste 0)}} +
    • + +
    • + {{/if}} + {{/each}} + {{/if}} + {{/if}} +
    •  
    From 153bfe2e75eb11cc35e974475911b329eccb8fbf Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 10 Dec 2022 16:07:33 +0100 Subject: [PATCH 3/8] =?UTF-8?q?Simplification=20hbs=20pour=20la=20vue=20d?= =?UTF-8?q?=C3=A9taill=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/actor-sheet.html | 21 ++++++++++----------- templates/actor/vue-detaillee.html | 8 ++++++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index e47d27e8..4568f3df 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -50,17 +50,16 @@ {{!-- Compétences Tab --}}
    - - - {{#if options.vueDetaillee}}Vue simplifiée{{else}}Vue détaillée{{/if}} - - filter/montrer tout - {{#if options.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}} - - - + {{>"systems/foundryvtt-reve-de-dragon/templates/actor/vue-detaillee.html"}} + + {{#if options.showCompNiveauBase}} + Montrer tout + {{else}} + Filtrer + {{/if}} + + + diff --git a/templates/actor/vue-detaillee.html b/templates/actor/vue-detaillee.html index e4b5ca05..ec5db5a1 100644 --- a/templates/actor/vue-detaillee.html +++ b/templates/actor/vue-detaillee.html @@ -1,4 +1,8 @@ - - {{#if options.vueDetaillee}}Vue simplifiée{{else}}Vue détaillée{{/if}} + {{#if options.vueDetaillee}} + Vue simplifiée + {{else}} + Vue détaillée + {{/if}} + From df26e654ae52b4212cc74d9e713a76f2ee7d6bdb Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 10 Dec 2022 16:09:35 +0100 Subject: [PATCH 4/8] Fix des tailles de polices --- styles/simple.css | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/styles/simple.css b/styles/simple.css index d7658f6d..684aa273 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -31,12 +31,12 @@ :root { /* =================== 1. ACTOR SHEET FONT STYLES =========== */ --window-header-title-font-family: CaslonAntique; - --window-header-title-font-size: 1.5rem; + --window-header-title-font-size: 1.6rem; --window-header-title-font-weight: normal; --window-header-title-color: #f5f5f5; --major-button-font-family: CaslonAntique; - --major-button-font-size: 1.25rem; + --major-button-font-size: 1.4rem; --major-button-font-weight: normal; --major-button-color: #dadada; @@ -88,7 +88,7 @@ .window-app { font-family: CaslonAntique; text-align: justify; - font-size: 16px; + font-size: 1rem; letter-spacing: 1px; } @@ -199,7 +199,7 @@ i:is(.fas, .far) { /* =================== Navigation ============ */ .sheet nav.sheet-tabs { - font-size: 0.65rem; + font-size: 0.7rem; font-weight: bold; height: 4rem; flex: 0 0 4rem; @@ -621,6 +621,9 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) { .rdd-roll-dialog .description-sort { max-width: 550px; } +.rdd-roll-dialog div.dialog-content input { + font-size: 1rem; +} .rdd-roll-part { align-items: center; border-radius: 6px; padding: 3px; @@ -652,7 +655,7 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) { } .rdd-niveau-requis{ - font-size: 0.80rem; + font-size: 0.8rem; text-align: right; } @@ -675,11 +678,11 @@ div.placeholder-resolution span.table-proba-reussite{ } .poesie-extrait { - font-size: 0.85rem; + font-size: 0.9rem; font-style: italic; } .poesie-reference{ - font-size: 0.70rem; + font-size: 0.7rem; text-align: right; } .poesie-overflow { @@ -695,7 +698,7 @@ div.placeholder-resolution span.table-proba-reussite{ } .type-compendium{ - font-size: 0.60rem; + font-size: 0.6rem; } /* ======================================== */ @@ -1092,7 +1095,7 @@ div.competence-column div.categorie-competence{ /* ======================================== */ .table-nombres-astraux { border:1; - font-size: 0.75rem; + font-size: 0.8rem; } .table-nombres-astraux td { border: 1px solid black; @@ -1134,7 +1137,7 @@ div.competence-column div.categorie-competence{ margin-left: 8px; } .rdd-hud-menu label { - font-size: 0.75rem; + font-size: 0.8rem; } #token-hud .status-effects.active{ z-index: 2; @@ -1434,8 +1437,8 @@ div.competence-column div.categorie-competence{ font-family: "GoudyAcc"; color: #CCC; opacity: 90; - font-size: 13px; - line-height: 1; + font-size: 0.9rem; + line-height: 1px; text-align: center; padding: 0; margin: 0; @@ -1601,7 +1604,7 @@ div.competence-column div.categorie-competence{ .calendar-time{ grid-column: 1; grid-row: 2; - font-size: 1.10rem; + font-size: 1.1rem; text-align: center; margin: auto; cursor: pointer; @@ -1610,7 +1613,7 @@ div.competence-column div.categorie-competence{ .calendar-nombre-astral{ grid-column: 2; grid-row: 2; -font-size: 1.10rem; +font-size: 1.1rem; text-align: right; margin: auto; cursor: pointer; @@ -1703,7 +1706,7 @@ display: inline-flex; cursor: pointer; color: #ffffff; font-family: CaslonPro; - font-size: 14px; + font-size: 0.9px; padding: 4px 12px 0px 12px; text-decoration: none; text-shadow: 0px 1px 0px #4d3534; From 830e66749dc20886c5fa3fe71b1741429f78d519 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 10 Dec 2022 16:09:55 +0100 Subject: [PATCH 5/8] Lien des label vers les champs --- templates/item-competence-sheet.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/item-competence-sheet.html b/templates/item-competence-sheet.html index 77b2115b..78a7a780 100644 --- a/templates/item-competence-sheet.html +++ b/templates/item-competence-sheet.html @@ -15,7 +15,7 @@ {{!-- Sheet Body --}}
    - +
    - +
    - +
    - + {{#if isGM}} + +
    - +
    {{#if (eq system.categorie 'draconic')}}
    - +
    {{/if}}
    - +
    From 969cedfc3d949af349c44a66cf5ef5718bfd24c7 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 10 Dec 2022 16:18:35 +0100 Subject: [PATCH 6/8] Fix espace avant boutons --- module/rdd-roll-resolution-table.js | 11 +++++------ styles/simple.css | 8 +++++--- templates/dialog-roll-alchimie.html | 3 +-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/module/rdd-roll-resolution-table.js b/module/rdd-roll-resolution-table.js index ed73babf..fcb456f9 100644 --- a/module/rdd-roll-resolution-table.js +++ b/module/rdd-roll-resolution-table.js @@ -115,17 +115,16 @@ export class RdDRollResolutionTable extends Dialog { rollData.finalLevel = this._computeFinalLevel(rollData); const htmlTable = await RdDResolutionTable.buildHTMLTable({ - carac:rollData.caracValue, - level: rollData.finalLevel + carac: rollData.caracValue, + level: rollData.finalLevel, + maxCarac: 20, + maxLevel: 10 }); // Mise à jour valeurs this.html.find("[name='carac']").val(rollData.caracValue); this.html.find(".roll-param-resolution").text(rollData.selectedCarac.value + " / " + Misc.toSignedString(rollData.finalLevel)); - this.html.find(".table-resolution").remove(); - this.html.find(".table-proba-reussite").remove(); - - this.html.find("div.placeholder-resolution").append(htmlTable) + this.html.find("div.placeholder-resolution").empty().append(htmlTable) } diff --git a/styles/simple.css b/styles/simple.css index 684aa273..463dbe2e 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -116,7 +116,11 @@ select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { padding: 0; } -.strong-text{ +section.window-content div.dialog-buttons { + margin-top: 1rem; +} + +.strong-text { font-weight: bold; } i:is(.fas, .far) { @@ -658,11 +662,9 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) { font-size: 0.8rem; text-align: right; } - .placeholder-ajustements { flex-direction: column; } - .table-resolution-carac { background-color: yellow; } diff --git a/templates/dialog-roll-alchimie.html b/templates/dialog-roll-alchimie.html index 2aa5612b..577c58c3 100644 --- a/templates/dialog-roll-alchimie.html +++ b/templates/dialog-roll-alchimie.html @@ -24,8 +24,7 @@
    -
    -
    +
    \ No newline at end of file diff --git a/templates/dialog-roll-carac.html b/templates/dialog-roll-carac.html index 6bc65cee..78bae97d 100644 --- a/templates/dialog-roll-carac.html +++ b/templates/dialog-roll-carac.html @@ -19,6 +19,3 @@
    - - \ No newline at end of file diff --git a/templates/dialog-roll-chant.html b/templates/dialog-roll-chant.html index 7c5c279a..ffb2732b 100644 --- a/templates/dialog-roll-chant.html +++ b/templates/dialog-roll-chant.html @@ -21,6 +21,3 @@
    - - \ No newline at end of file diff --git a/templates/dialog-roll-competence.html b/templates/dialog-roll-competence.html index f0706973..800d4bfc 100644 --- a/templates/dialog-roll-competence.html +++ b/templates/dialog-roll-competence.html @@ -81,6 +81,3 @@
    - - diff --git a/templates/dialog-roll-danse.html b/templates/dialog-roll-danse.html index a0dee025..c7d9c8b9 100644 --- a/templates/dialog-roll-danse.html +++ b/templates/dialog-roll-danse.html @@ -22,6 +22,3 @@
    - - \ No newline at end of file diff --git a/templates/dialog-roll-defense-possession.html b/templates/dialog-roll-defense-possession.html index 7ec558f5..1c114a10 100644 --- a/templates/dialog-roll-defense-possession.html +++ b/templates/dialog-roll-defense-possession.html @@ -22,7 +22,3 @@
    - - - \ No newline at end of file diff --git a/templates/dialog-roll-jeu.html b/templates/dialog-roll-jeu.html index 7138beff..17fedcb0 100644 --- a/templates/dialog-roll-jeu.html +++ b/templates/dialog-roll-jeu.html @@ -23,6 +23,3 @@
    - - \ No newline at end of file diff --git a/templates/dialog-roll-maitrise-tmr.html b/templates/dialog-roll-maitrise-tmr.html index c5652197..c90b9ba2 100644 --- a/templates/dialog-roll-maitrise-tmr.html +++ b/templates/dialog-roll-maitrise-tmr.html @@ -23,6 +23,3 @@
    - - \ No newline at end of file diff --git a/templates/dialog-roll-meditation.html b/templates/dialog-roll-meditation.html index 76685ac3..abbb4187 100644 --- a/templates/dialog-roll-meditation.html +++ b/templates/dialog-roll-meditation.html @@ -43,6 +43,3 @@
    - - \ No newline at end of file diff --git a/templates/dialog-roll-musique.html b/templates/dialog-roll-musique.html index 154365c5..a0dfee56 100644 --- a/templates/dialog-roll-musique.html +++ b/templates/dialog-roll-musique.html @@ -21,6 +21,3 @@
    - - diff --git a/templates/dialog-roll-oeuvre.html b/templates/dialog-roll-oeuvre.html index 0e449e0b..a9a8e10b 100644 --- a/templates/dialog-roll-oeuvre.html +++ b/templates/dialog-roll-oeuvre.html @@ -22,6 +22,3 @@
    - - diff --git a/templates/dialog-roll-recettecuisine.html b/templates/dialog-roll-recettecuisine.html index a77f5976..5e17ccbb 100644 --- a/templates/dialog-roll-recettecuisine.html +++ b/templates/dialog-roll-recettecuisine.html @@ -35,6 +35,3 @@ {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
    - - \ No newline at end of file diff --git a/templates/dialog-roll-reve-de-dragon.html b/templates/dialog-roll-reve-de-dragon.html index c0496835..1f89338a 100644 --- a/templates/dialog-roll-reve-de-dragon.html +++ b/templates/dialog-roll-reve-de-dragon.html @@ -18,7 +18,3 @@
    - - - \ No newline at end of file diff --git a/templates/dialog-roll-signedraconique.html b/templates/dialog-roll-signedraconique.html index c73dd7df..e350634d 100644 --- a/templates/dialog-roll-signedraconique.html +++ b/templates/dialog-roll-signedraconique.html @@ -39,6 +39,3 @@
    - -