diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 2c8c2110..9cc84b58 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -86,15 +86,15 @@ export class RdDActorSheet extends ActorSheet { } // To avoid armour and so on... - data.data.armes_seules = duplicate( this._checkNull(data.itemsByType['arme'])); + data.data.combat = duplicate( this._checkNull(data.itemsByType['arme'])); if (data.competenceByCategory && data.competenceByCategory.melee) { //Specific case for Esquive and Corps à Corps for ( const melee of data.competenceByCategory.melee ) { if (melee.name == "Esquive") - data.itemsByType.arme.push( { name: "Esquive", data: { niveau: melee.data.niveau, description: "", force: 6, competence: "Esquive", dommages: 0} } ); + data.data.combat.push( { name: "Esquive", data: { niveau: melee.data.niveau, description: "", force: 6, competence: "Esquive", dommages: 0} } ); if (melee.name == "Corps à corps") - data.itemsByType.arme.push( { name: "Corps à corps", data: { niveau: melee.data.niveau, description: "", force: 6, competence: "Corps à corps", dommages: data.data.attributs.plusdom.value } } ); + data.data.combat.push( { name: "Corps à corps", data: { niveau: melee.data.niveau, description: "", force: 6, competence: "Corps à corps", dommages: data.data.attributs.plusdom.value } } ); } } diff --git a/module/rdd-utility.js b/module/rdd-utility.js index 9a027254..42282e26 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -164,10 +164,11 @@ export class RdDUtility { } /* -------------------------------------------- */ + /** Construit la structure récursive des conteneurs, avec imbrication potentielle + * + */ static buildConteneur( objet, niveau ) { if (!niveau) niveau = 1; - let prefix = ""; - for (let i = 0; i < niveau; i++) prefix += " "; let str = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-inventaire-conteneur.html']( { item: objet} ); if (objet.type == 'conteneur') { str = str + "
    "; diff --git a/system.json b/system.json index 4046ead6..c7079f9b 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.32", + "version": "0.9.33", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.6", "templateVersion": 44, diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 926fcc04..fc3a25cc 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -265,7 +265,7 @@ +dom
      - {{#each data.armes as |arme key|}} + {{#each data.combat as |arme key|}}
    1. {{arme.name}} {{arme.data.competence}} @@ -421,7 +421,7 @@ {{!-- Equipment Tab --}}
      - Encombrement total/max : {{data.encombrementTotal}} / {{data.attributs.encombrement.value}} + Encombrement total/max : {{numberFormat data.encombrementTotal decimals=1}} / {{data.attributs.encombrement.value}}
      Porté sur soi
        @@ -440,11 +440,9 @@ {{/if}} {{/unless}} {{/each}} -
          - {{#each data.conteneurs as |conteneur id|}} - {{buildConteneur this}} - {{/each}} -
        + {{#each data.conteneurs as |conteneur id|}} + {{buildConteneur this}} + {{/each}}
      {{!-- Biography Tab --}}