From 3ff59d1f07dbf7e53b2f8f78df75a9a8742bcdd7 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 27 Aug 2022 16:23:22 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20rendu=20=C3=A9quipement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/rdd-utility.js | 8 +- styles/simple.css | 57 ++++++++++---- templates/actor-creature-sheet.html | 30 +------- ....html => actor-sheet-inventaire-item.html} | 34 ++++---- templates/actor-sheet-inventaire-monnaie.html | 24 ++++-- templates/actor-sheet-inventaire.html | 26 +++++++ templates/actor-sheet-liens-animaux.html | 12 +++ templates/actor-sheet-liens-suivants.html | 12 +++ templates/actor-sheet-liens-vehicules.html | 15 ++++ templates/actor-sheet.html | 77 +------------------ templates/actor-vehicule-sheet.html | 42 +--------- templates/item-conteneur-sheet.html | 9 +-- 12 files changed, 155 insertions(+), 191 deletions(-) rename templates/{actor-sheet-inventaire-conteneur.html => actor-sheet-inventaire-item.html} (65%) create mode 100644 templates/actor-sheet-inventaire.html create mode 100644 templates/actor-sheet-liens-animaux.html create mode 100644 templates/actor-sheet-liens-suivants.html create mode 100644 templates/actor-sheet-liens-vehicules.html diff --git a/module/rdd-utility.js b/module/rdd-utility.js index dd49d522..3b927d64 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', @@ -471,7 +475,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..75742656 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -225,6 +225,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; @@ -713,8 +733,8 @@ ul, li { } .sheet li { - margin: 0.125rem; - padding: 0.25rem; + margin: 0.1rem; + padding: 0.2rem; } .header-fields li { margin: 0; @@ -747,7 +767,9 @@ ul, li { .fa-arrow-alt-circle-up.allouer-stress-level-up { color: rgba(191, 149, 63, 0.8); } - +i.fas, i.far { + font-size: smaller; +} .blessures-list ul { display: flex; } @@ -766,18 +788,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 +823,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 { @@ -872,20 +897,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; diff --git a/templates/actor-creature-sheet.html b/templates/actor-creature-sheet.html index b9d3e4d0..99782371 100644 --- a/templates/actor-creature-sheet.html +++ b/templates/actor-creature-sheet.html @@ -126,35 +126,7 @@ {{!-- Equipment Tab --}}
- - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}} - -

Equipement porté

- Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} {{calc.surEncombrementMessage}} - - Créer un objet - {{#if options.isGM}} - - Vider tout les conteneurs - {{/if}} - - + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html"}}
{{!-- Biography Tab --}} diff --git a/templates/actor-sheet-inventaire-conteneur.html b/templates/actor-sheet-inventaire-item.html similarity index 65% rename from templates/actor-sheet-inventaire-conteneur.html rename to templates/actor-sheet-inventaire-item.html index a1c624d2..e46f8745 100644 --- a/templates/actor-sheet-inventaire-conteneur.html +++ b/templates/actor-sheet-inventaire-item.html @@ -1,37 +1,33 @@
  • - {{#if (eq item.type 'conteneur')}} - + + {{#if (eq item.type 'conteneur')}} {{#if vide}} - + {{else}} {{#if ouvert}} - {{else}} - {{/if}} {{/if}} - - - {{item.name}} + {{item.name}} - - {{else}} - - {{item.name}} - {{/if}} - {{item.data.quantite}} + {{else}} + + {{item.name}} + {{/if}} + + {{item.data.quantite}} {{#if (gt item.data.quantite 1)}} {{/if}} - {{numberFormat item.data.encTotal decimals=2}} -
    + {{numberFormat item.data.encTotal decimals=2}} + {{#unless item.estContenu}} {{#if (ne item.type 'conteneur')}} {{#if item.data.equipe}}{{else}}{{/if}} @@ -39,14 +35,14 @@ {{/unless}} - {{#if (or (eq item.type 'arme') (eq item.type 'conteneur') item.data.quantite)}}   + {{#if (or (eq item.type 'arme') (eq item.type 'conteneur') item.data.quantite)}} {{/if}} {{#if item.data.actionPrincipale}} - {{item.data.actionPrincipale}} + {{item.data.actionPrincipale}} {{/if}} -
    +
  • diff --git a/templates/actor-sheet-inventaire-monnaie.html b/templates/actor-sheet-inventaire-monnaie.html index d73224b2..0921720c 100644 --- a/templates/actor-sheet-inventaire-monnaie.html +++ b/templates/actor-sheet-inventaire-monnaie.html @@ -3,16 +3,26 @@ {{#each monnaie as |piece id|}}
  • - {{piece.name}} - {{piece.data.quantite}} - - + - - + {{piece.name}} + + -
    + + {{piece.data.quantite}} + + + + + + + -
    +
  • {{/each}} diff --git a/templates/actor-sheet-inventaire.html b/templates/actor-sheet-inventaire.html new file mode 100644 index 00000000..c14600ae --- /dev/null +++ b/templates/actor-sheet-inventaire.html @@ -0,0 +1,26 @@ +{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}} + +

    Equipement

    +Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} {{calc.surEncombrementMessage}} - +Créer un objet +{{#if options.isGM}} + - Vider tout les conteneurs +{{/if}} + diff --git a/templates/actor-sheet-liens-animaux.html b/templates/actor-sheet-liens-animaux.html new file mode 100644 index 00000000..c9b6aa92 --- /dev/null +++ b/templates/actor-sheet-liens-animaux.html @@ -0,0 +1,12 @@ +

    Compagnons animaux

    + diff --git a/templates/actor-sheet-liens-suivants.html b/templates/actor-sheet-liens-suivants.html new file mode 100644 index 00000000..4ee37e0a --- /dev/null +++ b/templates/actor-sheet-liens-suivants.html @@ -0,0 +1,12 @@ +

    Suivants

    + diff --git a/templates/actor-sheet-liens-vehicules.html b/templates/actor-sheet-liens-vehicules.html new file mode 100644 index 00000000..6951d70f --- /dev/null +++ b/templates/actor-sheet-liens-vehicules.html @@ -0,0 +1,15 @@ +

    Véhicules

    + + diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index f65df255..62c01be6 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -666,79 +666,10 @@ {{!-- Equipment Tab --}}
    - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}} - -

    Equipement porté

    -
    - Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} {{calc.surEncombrementMessage}} - - Estimation de l'équipement : {{numberFormat calc.prixTotalEquipement decimals=2}} Sols -
    -
    - Créer un objet - {{#if options.isGM}} - - Vider tout les conteneurs - {{/if}} -
    - - -

    Compagnons animaux

    - - -

    Véhicules

    - - -

    Suivants

    - + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.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"}}
    diff --git a/templates/actor-vehicule-sheet.html b/templates/actor-vehicule-sheet.html index 1e645e71..7b27166e 100644 --- a/templates/actor-vehicule-sheet.html +++ b/templates/actor-vehicule-sheet.html @@ -69,47 +69,9 @@ {{!-- Equipment Tab --}}
    - {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}} - -

    Equipement chargé

    - - Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.capacite_encombrement}} {{calc.surEncombrementMessage}} - - Créer un objet - {{#if options.isGM}} - - Vider tout les conteneurs - {{/if}} - -
    - + {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html"}} + {{!-- Biography Tab --}}
    diff --git a/templates/item-conteneur-sheet.html b/templates/item-conteneur-sheet.html index 06bce9e1..3cf93108 100644 --- a/templates/item-conteneur-sheet.html +++ b/templates/item-conteneur-sheet.html @@ -29,11 +29,10 @@
    • - - Nom - Q. - Enc. - Equiper/Editer/Suppr. + Nom + Q. + Enc. + Actions
    • {{buildContenu this}}