diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 035acb38..1d995885 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -432,14 +432,17 @@ export class RdDActorSheet extends ActorSheet { } }) .keyup(async event => { - this.options.recherche = this._optionRecherche(event.currentTarget) - if (this.timerRecherche) { - clearTimeout(this.timerRecherche); + const nouvelleRecherche = this._optionRecherche(event.currentTarget); + if (this.options.recherche?.text != nouvelleRecherche?.text){ + this.options.recherche = nouvelleRecherche; + if (this.timerRecherche) { + clearTimeout(this.timerRecherche); + } + this.timerRecherche = setTimeout(() => { + this.timerRecherche = undefined; + this.render(true); + }, 500); } - this.timerRecherche = setTimeout(() => { - this.timerRecherche = undefined; - this.render(true); - }, 500); }) .change(async event => this.options.recherche = this._optionRecherche(event.currentTarget) diff --git a/module/rdd-utility.js b/module/rdd-utility.js index 7c3c22c7..01812e66 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -122,8 +122,12 @@ export class RdDUtility { 'systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html', // Conteneur/item in Actor sheet - 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-item.html', "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html", + 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-animaux.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-suivants.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-vehicules.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html', //Items 'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html', @@ -235,36 +239,38 @@ export class RdDUtility { Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord)); Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1))); - Handlebars.registerHelper('sortCompetence', competences => competences.sort((a, b) => { - if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) { - if (a.name.includes("Cité")) return -1; - if (b.name.includes("Cité")) return 1; - if (a.name.includes("Extérieur")) return -1; - if (b.name.includes("Extérieur")) return 1; + Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.visible) + .sort((a, b) => { + if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) { + if (a.name.includes("Cité")) return -1; + if (b.name.includes("Cité")) return 1; + if (a.name.includes("Extérieur")) return -1; + if (b.name.includes("Extérieur")) return 1; + return a.name.localeCompare(b.name); + } + if (a.data.categorie.startsWith("melee") && b.data.categorie.startsWith("melee")) { + if (a.name.includes("Corps")) return -1; + if (b.name.includes("Corps")) return 1; + if (a.name.includes("Dague")) return -1; + if (b.name.includes("Dague")) return 1; + if (a.name.includes("Esquive")) return -1; + if (b.name.includes("Esquive")) return 1; + return a.name.localeCompare(b.name); + } + if (a.name.startsWith("Voie") && b.name.startsWith("Voie")) { + if (a.name.includes("Oniros")) return -1; + if (b.name.includes("Oniros")) return 1; + if (a.name.includes("Hypnos")) return -1; + if (b.name.includes("Hypnos")) return 1; + if (a.name.includes("Narcos")) return -1; + if (b.name.includes("Narcos")) return 1; + if (a.name.includes("Thanatos")) return -1; + if (b.name.includes("Thanatos")) return 1; + return a.name.localeCompare(b.name); + } return a.name.localeCompare(b.name); - } - if (a.system.categorie.startsWith("melee") && b.system.categorie.startsWith("melee")) { - if (a.name.includes("Corps")) return -1; - if (b.name.includes("Corps")) return 1; - if (a.name.includes("Dague")) return -1; - if (b.name.includes("Dague")) return 1; - if (a.name.includes("Esquive")) return -1; - if (b.name.includes("Esquive")) return 1; - return a.name.localeCompare(b.name); - } - if (a.name.startsWith("Voie") && b.name.startsWith("Voie")) { - if (a.name.includes("Oniros")) return -1; - if (b.name.includes("Oniros")) return 1; - if (a.name.includes("Hypnos")) return -1; - if (b.name.includes("Hypnos")) return 1; - if (a.name.includes("Narcos")) return -1; - if (b.name.includes("Narcos")) return 1; - if (a.name.includes("Thanatos")) return -1; - if (b.name.includes("Thanatos")) return 1; - return a.name.localeCompare(b.name); - } - return a.name.localeCompare(b.name); - })); + }) + ); return loadTemplates(templatePaths); } @@ -470,7 +476,7 @@ export class RdDUtility { const isConteneur = objet.type == 'conteneur'; const isOuvert = isConteneur && this.getAfficheContenu(objet._id); const isVide = isConteneur && Misc.templateData(objet).contenu.length == 0; - const conteneur = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html']({ + const conteneur = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-item.html']({ item: objet, vide: isVide, ouvert: isOuvert diff --git a/styles/simple.css b/styles/simple.css index 6d158832..275c3375 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -65,7 +65,11 @@ --debug-box-shadow-blue: inset 0 0 2px blue; --debug-box-shadow-green: inset 0 0 2px green; -/* =================== 3. some constants ============ */ +/* =================== 3. some constants ============ */ + --color-controls:rgba(0, 0, 0, 0.9); + --color-controls-hover:rgba(255, 255, 128, 0.7); + --color-control-border-hover:rgba(255, 128, 0, 0.8); + --color-gold: rgba(191, 149, 63, 0.8); --gradient-gold: linear-gradient(30deg, rgba(191, 149, 63, 0.3), rgba(252, 246, 186, 0.3), rgba(179, 135, 40, 0.3), rgba(251, 245, 183, 0.3), rgba(170, 119, 28, 0.3)); --gradient-silver: linear-gradient(30deg, rgba(61, 55, 93, 0.3), rgba(178, 179, 196, 0.3), rgba(59, 62, 63, 0.6), rgba(206, 204, 199, 0.3), rgba(61, 46, 49, 0.3)); --gradient-green: linear-gradient(30deg, rgba(7, 76, 0, 0.3), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.1), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.3)); @@ -104,6 +108,9 @@ .strong-text{ font-weight: bold; } +i:is(.fas, .far) { + font-size: smaller; +} .tabs .item.active, .blessures-list li ul li:first-child:hover, a:hover { text-shadow: 1px 0px 0px #ff6600; @@ -225,6 +232,26 @@ table {border: 1px solid #7a7971;} flex-grow : 3; } /* Styles limited to foundryvtt-reve-de-dragon sheets */ +.equipement-nom { + flex-grow : 4; + margin: 0; + justify-content: center; + text-align: left; +} +.equipement-detail { + margin: 0; + flex: 'flex-shrink' ; + align-items: center; + justify-content: center; + text-align: center; +} +.equipement-actions { + margin: 0; + flex-grow: 2; + align-items: center; + justify-content: center; + text-align: left; +} .foundryvtt-reve-de-dragon .sheet-header { -webkit-box-flex: 0; @@ -266,14 +293,8 @@ table {border: 1px solid #7a7971;} height: 8%; max-height: 48px; border-width: 0; - border: 1px solid rgba(0, 0, 0, 0); + border: 1px solid rgba(0, 0, 0, 0); } -.button-img:hover { - color: rgba(255, 255, 128, 0.7); - border: 1px solid rgba(255, 128, 0, 0.8); - cursor: pointer; -} - .button-effect-img { vertical-align: baseline; width: 16px; @@ -281,9 +302,16 @@ table {border: 1px solid #7a7971;} height: 16; border-width: 0; } -.button-effect-img:hover { - color: rgba(255, 255, 128, 0.7); - border: 1px solid rgba(255, 128, 0, 0.8); +.small-button-direction { + height: 32px; + width: 32px; + border: 0; + vertical-align: bottom; +} +:is(.button-img,.button-effect-img:hover,.small-button-direction):hover { + color: var(--color-controls-hover); + border: 1px solid var(--color-control-border-hover); + text-shadow: 1px 0px 0px #ff6600; cursor: pointer; } @@ -294,18 +322,6 @@ table {border: 1px solid #7a7971;} vertical-align: bottom; } -.small-button-direction { - height: 32px; - width: 32px; - border: 0; - vertical-align: bottom; -} -.small-button-direction:hover { - color: rgba(255, 255, 128, 0.7); - border: 1px solid rgba(255, 128, 0, 0.8); - cursor: pointer; -} - .foundryvtt-reve-de-dragon .sheet-header .header-fields { -webkit-box-flex: 1; -ms-flex: 1; @@ -346,25 +362,25 @@ table {border: 1px solid #7a7971;} flex-grow: 0; } -.rdd.sheet .window-content .sheet-body .carac-list .competence { +.rdd.sheet .window-content .sheet-body .carac-list .caracteristique { flex-wrap: nowrap; justify-content: stretch; } -.rdd.sheet .window-content .sheet-body .carac-list .competence > .carac-label { +.rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .carac-label { flex-basis: 50%; } -.rdd.sheet .window-content .sheet-body .carac-list .competence > .attribut-label { +.rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .attribut-label { flex-basis: 50%; } -.rdd.sheet .window-content .sheet-body .carac-list .competence > .competence-value.total { +.rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .competence-value.total { flex-grow: 1; text-align: right; } -.rdd.sheet .window-content .sheet-body .carac-list .competence > .utiliser-attribut { +.rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .utiliser-attribut { flex-basis: available; flex-grow: 1; } -.rdd.sheet .window-content .sheet-body .carac-list .competence > * { +.rdd.sheet .window-content .sheet-body .carac-list .caracteristique > * { flex-basis: 13%; flex-grow: 0; } @@ -469,13 +485,18 @@ table {border: 1px solid #7a7971;} flex: 0 0 86px; text-align: right; } - .competence-list .item-controls { display: contents !important; } .competence-list .item-controls.hidden-controls { display: none !important; } +.item-controls i:is(.fas,.far) { + color: var(--color-controls); +} +.item-controls i:is(.fas,.far):hover { + opacity: 0.7 ; +} .rdddialog .dialog-roll-sort s{ width: 600px; @@ -567,7 +588,7 @@ table {border: 1px solid #7a7971;} color: rgba(255, 255, 255, 0.75); background: rgba(255, 255, 255, 0.05); border: 0 none; - margin-bottom: 0.25rem; + margin-bottom: 0.2rem; } .window-app .window-content, .window-app.sheet .window-content .sheet-body{ @@ -601,7 +622,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;} nav.sheet-tabs .item { position: relative; - padding: 0 0.25rem; + padding: 0 0.2rem; } nav.sheet-tabs .item:after { @@ -627,11 +648,15 @@ section.sheet-body:after { .sheet header.sheet-header .flex-compteurs {text-align: right;} .sheet header.sheet-header .resource-content {width: 2rem;} -.ctn-vie span, .ctn-endu span, .ctn-fatigue span, .ctn-reve span { +.compteur span { display: inline-block; text-align: left; width: 2rem; } +.compteur a i:is(.fas,.far):hover { + opacity: 0.7 ; +} + .select-diff { display: inline-block; text-align: left; @@ -644,17 +669,6 @@ section.sheet-body:after { max-width: 90%; } -.plus-moins { - display: inline-block; - width: 1.25rem; - background: rgba(30, 25, 20, 1); - text-align: center; - border: 1px solid rgba(72, 46, 28, 1); - border-radius: 0.25rem; - line-height: 1.25rem; - color: rgba(255, 255, 255, 0.5); -} - .alchimie-tache { font-weight: bold; background: rgb(182, 180, 179); @@ -711,10 +725,13 @@ ul, ol { ul, li { list-style-type: none; } - +.sheet .caracteristique li { + margin: 0.1rem; + padding: 0.2rem; +} .sheet li { - margin: 0.125rem; - padding: 0.25rem; + margin: 0.1rem; + padding: 0.1rem; } .header-fields li { margin: 0; @@ -731,23 +748,19 @@ ul, li { background: rgb(160, 130, 100, 0.05); } .xp-level-up { - margin: 0.125rem; + margin: 0.1rem; box-shadow: inset 0px 0px 1px #00000096; border-radius: 0.25rem; - padding: 0.125rem; + padding: 0.1rem; flex: 1 1 5rem; background: var(--gradient-gold) !important; } .niveau-archetype { background: var(--gradient-silver-light) !important; } -.fa-arrow-alt-circle-up.allouer-stress { - color: rgba(83, 60, 14, 0.8); +.item-controls i.fas.allouer-stress.level-up { + color: var(--color-gold); } -.fa-arrow-alt-circle-up.allouer-stress-level-up { - color: rgba(191, 149, 63, 0.8); -} - .blessures-list ul { display: flex; } @@ -766,18 +779,18 @@ ul, li { font-weight: bold; } .list-item { - margin: 0.125rem; + margin: 0.1rem; box-shadow: inset 0px 0px 1px #00000096; border-radius: 0.25rem; - padding: 0.125rem; + padding: 0.1rem; flex: 1 1 5rem; display: flex !important; - align-items: baseline !important; + align-items: center !important; } .table-row { - margin: 0.125rem; - padding: 0.125rem; + margin: 0.1rem; + padding: 0.1rem; flex: 1 1 5rem; } @@ -801,8 +814,11 @@ ul, li { background: rgb(200, 10, 100, 0.25); } -.item-quantite { - margin-left: 0.5rem; +.item-column { + margin-left: 0.2rem; + margin-right: 0.2rem; + justify-content: center; + text-align: center; } .list-item-margin1 { @@ -828,7 +844,7 @@ ul, li { width: 24px; height: 24px; flex-grow: 0; - margin-right: 0.25rem; + margin-right: 0.2rem; vertical-align: bottom; } .competence-column { @@ -872,20 +888,20 @@ ul, li { .competence-value { flex-grow: 0; flex-basis: 2rem; - margin-right: 0.25rem; - margin-left: 0.25rem; + margin-right: 0.2rem; + margin-left: 0.2rem; } .description-value { flex-grow: 0; flex-basis: 4rem; - margin-right: 0.25rem; - margin-left: 0.25rem; + margin-right: 0.2rem; + margin-left: 0.2rem; } .competence-xp { flex-grow: 0; flex-basis: 2rem; - margin-right: 0.25rem; - margin-left: 0.25rem; + margin-right: 0.2rem; + margin-left: 0.2rem; } .blessures-title { font-weight: bold; @@ -963,7 +979,7 @@ ul, li { flex-basis: auto; padding: 0; line-height: 1rem; - margin: 0.25rem; + margin: 0.2rem; } .control-icon.tokenhudicon.right { margin-left: 8px; @@ -981,7 +997,7 @@ ul, li { border-left: none; font-weight: 500; font-size: 1rem; - color: black; + color: var(--color-controls); padding-top: 5px; margin-right: 0px; width: 45px; @@ -1081,7 +1097,7 @@ ul, li { .sidebar-tab .directory-list .entity { border-top: 1px dashed rgba(0,0,0,0.25); border-bottom: 0 none; - padding: 0.25rem 0; + padding: 0.2rem 0; } .sidebar-tab .directory-list .entity:hover { @@ -1159,11 +1175,11 @@ ul, li { border-image-width: 4px; border-image-outset: 0px; } - #controls .control-tools { - max-height: calc(100vh - 156px); - height: auto; +#controls .control-tools { + max-height: calc(100vh - 156px); + height: auto; } -#controls .scene-control.active, #controls .control-tool.active, #controls .scene-control:hover, #controls .control-tool:hover { +#controls :is(.scene-control.active,.control-tool.active, .scene-control:hover, .control-tool:hover) { background: rgba(72, 46, 28, 1); background-origin: padding-box; border-image: url(img/ui/footer-button.webp) 10 repeat; @@ -1349,8 +1365,8 @@ ul, li { color: rgba(255, 255, 255, 0.5); } .calendar-btn:hover { - color: rgba(255, 255, 128, 0.7); - border: 1px solid rgba(255, 128, 0, 0.8); + color: var(--color-controls-hover); + border: 1px solid var(--color-control-border-hover); cursor: pointer; } diff --git a/system.json b/system.json index d5868b7e..4df6a552 100644 --- a/system.json +++ b/system.json @@ -34,7 +34,7 @@ ], "url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/", "license": "LICENSE.txt", - "version": "10.0.6", + "version": "10.0.7", "compatibility": { "minimum": "10" }, @@ -331,14 +331,8 @@ } ], "socket": true, -<<<<<<< HEAD "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.0.6.zip", -======= - "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v1.5/system.json", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-1.5.86.zip", - "protected": false, ->>>>>>> origin/v1.5 + "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.0.7.zip", "gridDistance": 1, "gridUnits": "m", "primaryTokenAttribute": "sante.vie", diff --git a/templates/actor-blessure-partial.html b/templates/actor-blessure-partial.html index 57ee004f..d475751b 100644 --- a/templates/actor-blessure-partial.html +++ b/templates/actor-blessure-partial.html @@ -1,5 +1,5 @@