diff --git a/module/dialog-repos.js b/module/dialog-repos.js index e5e10576..2c7d601b 100644 --- a/module/dialog-repos.js +++ b/module/dialog-repos.js @@ -9,7 +9,7 @@ export class DialogRepos extends Dialog { } constructor(html, actor) { - let options = { classes: ["DialogCreateSigneDraconiqueActorsActors"], width: 500, height: 400, 'z-index': 99999 }; + let options = { classes: ["DialogCreateSigneDraconiqueActorsActors"], width: 400, height: 'fit-content', 'z-index': 99999 }; let conf = { title: "Se reposer", content: html, 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/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 724bb2eb..463dbe2e 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; } @@ -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) { @@ -199,7 +203,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 +625,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,14 +659,12 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) { } .rdd-niveau-requis{ - font-size: 0.80rem; + font-size: 0.8rem; text-align: right; } - .placeholder-ajustements { flex-direction: column; } - .table-resolution-carac { background-color: yellow; } @@ -675,11 +680,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 +700,7 @@ div.placeholder-resolution span.table-proba-reussite{ } .type-compendium{ - font-size: 0.60rem; + font-size: 0.6rem; } /* ======================================== */ @@ -1011,6 +1016,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; @@ -1089,7 +1097,7 @@ ul.list-item-margin6 li { /* ======================================== */ .table-nombres-astraux { border:1; - font-size: 0.75rem; + font-size: 0.8rem; } .table-nombres-astraux td { border: 1px solid black; @@ -1131,7 +1139,7 @@ ul.list-item-margin6 li { margin-left: 8px; } .rdd-hud-menu label { - font-size: 0.75rem; + font-size: 0.8rem; } #token-hud .status-effects.active{ z-index: 2; @@ -1431,8 +1439,8 @@ ul.list-item-margin6 li { 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; @@ -1598,7 +1606,7 @@ ul.list-item-margin6 li { .calendar-time{ grid-column: 1; grid-row: 2; - font-size: 1.10rem; + font-size: 1.1rem; text-align: center; margin: auto; cursor: pointer; @@ -1607,7 +1615,7 @@ ul.list-item-margin6 li { .calendar-nombre-astral{ grid-column: 2; grid-row: 2; -font-size: 1.10rem; +font-size: 1.1rem; text-align: right; margin: auto; cursor: pointer; @@ -1700,7 +1708,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; diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 17d4d1ae..4568f3df 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -50,29 +50,28 @@ {{!-- Compétences Tab --}}