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 + "