From d3111f6d286af8ae5320fa14ab4f2f0a0ab11abb Mon Sep 17 00:00:00 2001 From: sladecraven Date: Tue, 24 Nov 2020 18:39:27 +0100 Subject: [PATCH] =?UTF-8?q?#3=20Am=C3=A9liorations=20fiche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor-sheet.js | 2 +- module/rdd-dice.js | 4 ++-- module/rdd-utility.js | 4 ++-- styles/simple.css | 13 ++++++----- system.json | 2 +- templates/actor-sheet.html | 48 +++++++++++++++++++------------------- 6 files changed, 37 insertions(+), 36 deletions(-) diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 7f9c4feb..2bffabb6 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -72,7 +72,7 @@ export class RdDActorSheet extends ActorSheet { // To avoid armour and so on... data.data.combat = duplicate( RdDUtility.checkNull(data.itemsByType['arme'])); - data.data.combat = RdDUtility.finalizeArmeList( data.data.combat ) + data.data.combat = RdDUtility.finalizeArmeList( data.data.combat, data.competenceByCategory ); if (data.competenceByCategory && data.competenceByCategory.melee) { //Specific case for Esquive and Corps à Corps diff --git a/module/rdd-dice.js b/module/rdd-dice.js index bdd3be73..7a08ee2d 100644 --- a/module/rdd-dice.js +++ b/module/rdd-dice.js @@ -28,10 +28,10 @@ export class RdDDice { case "blindroll": //GM only blind = true; case "gmroll": //GM + rolling player - whisper = ChatUtility.getUsersIds(user => user.isGM); + whisper = ChatUtility.getUsers(user => user.isGM); break; case "roll": //everybody - whisper = ChatUtility.getUsersIds(user => user.active); + whisper = ChatUtility.getUsers(user => user.active); break; case "selfroll": whisper = [game.user._id]; diff --git a/module/rdd-utility.js b/module/rdd-utility.js index b8220346..60fcd3d2 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -339,7 +339,7 @@ export class RdDUtility { /* -------------------------------------------- */ /** Retourne une liste triée d'armes avec le split arme1 main / arme 2 main */ - static finalizeArmeList( armeList ) { + static finalizeArmeList( armeList, competenceByCategory ) { // Gestion des armes 1/2 mains let arme2mains = []; // Tableau contenant la duplication des armes 1m/2m for (const arme of armeList) { @@ -348,7 +348,7 @@ export class RdDUtility { let arme2main = duplicate(arme); arme2main.data.dommages = arme2main.data.dommages.split("/")[1]; // Existence temporaire uniquement dans la liste des armes, donc OK arme2main.data.competence = arme2main.data.competence.replace(" 1 main", " 2 mains"); // Replace ! - for ( const melee of data.competenceByCategory.melee ) { + for ( const melee of competenceByCategory.melee ) { if (melee.name == arme2main.data.competence ) arme2main.data.niveau = melee.data.niveau } diff --git a/styles/simple.css b/styles/simple.css index 2444dbcd..1cd87925 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -463,22 +463,23 @@ section.sheet-body:after, section.sheet-body div:after { /* Global UI elements */ /* ======================================== */ -.inventory-list > .list-combat:nth-child(even) { - background-color: #7b733b29; +.alterne-list > .list-item:nth-child(even) { + background-color:#7b733b29; background: #7b733b29; } -.inventory-list > .list-combat:nth-child(odd) { +.alterne-list > .list-item:nth-child(odd) { background-color: #9e856a0d; background: #9e856a0d; } - -.list-combat { +.carac-label { + font-weight: bold; +} +.list-item { margin: 2px 2px 2px 2px; box-shadow: inset 0px 0px 1px #00000096; border-radius: 5px; padding: 2px 5px 0px 5px; } - .sheet-competence-img { width: 24px; height: 24px; diff --git a/system.json b/system.json index c5ae549a..3b482c24 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "0.9.84", + "version": "0.9.85", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.6", "templateVersion": 48, diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 0285f965..2aad2266 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -109,9 +109,9 @@
-
    +
      {{#each data.carac as |carac key|}} -
    1. +
    2. {{#if carac.isTaille}} {{carac.label}} {{else}} @@ -155,9 +155,9 @@
      Compétences de base
      -
        +
          {{#each data.competenceByCategory.generale as |comp key|}} -
        1. +
        2. {{comp.name}} @@ -173,9 +173,9 @@
          Compétences Particulières
          -
            +
              {{#each data.competenceByCategory.particuliere as |comp key|}} -
            1. +
            2. {{comp.name}} @@ -190,9 +190,9 @@
              Compétences Spécialisées
              -
                +
                  {{#each data.competenceByCategory.specialisee as |comp key|}} -
                1. +
                2. {{comp.name}} @@ -210,9 +210,9 @@
                  Compétences De Mêlée
                  -
                    +
                      {{#each data.competenceByCategory.melee as |comp key|}} -
                    1. +
                    2. {{comp.name}} @@ -228,9 +228,9 @@
                      Compétences De Tir
                      -
                        +
                          {{#each data.competenceByCategory.tir as |comp key|}} -
                        1. +
                        2. {{comp.name}} @@ -246,9 +246,9 @@
                          Compétences De Lancer
                          -
                            +
                              {{#each data.competenceByCategory.lancer as |comp key|}} -
                            1. +
                            2. {{comp.name}} @@ -264,9 +264,9 @@
                              Connaissances
                              -
                                +
                                  {{#each data.competenceByCategory.connaissance as |comp key|}} -
                                1. +
                                2. {{comp.name}} @@ -282,9 +282,9 @@
                                  Draconic
                                  -
                                    +
                                      {{#each data.competenceByCategory.draconic as |comp key|}} -
                                    1. +
                                    2. {{comp.name}} @@ -311,7 +311,7 @@ {{!-- Combat Tab --}}
                                      -
                                        +
                                        1. Armes Comp. @@ -319,7 +319,7 @@ +dom
                                        2. {{#each data.combat as |arme key|}} -
                                        3. +
                                        4. {{arme.name}} {{arme.data.competence}} {{numberFormat arme.data.niveau decimals=0 sign=true}} @@ -332,9 +332,9 @@ {{!-- Compteurs/Blessures Tab --}}
                                          -
                                            +
                                              {{#each data.compteurs as |compteur key|}} -
                                            1. +
                                            2. {{compteur.label}} {{#if compteur.isInput}} @@ -353,9 +353,9 @@
                                          Blessures Légeres : -
                                          +
                                          {{#each data.blessures.legeres.liste as |bless key|}} -
                                        5. +
                                        6. {{#if bless.active}}{{else}}{{/if}} Premiers soins - Soins complets -