Amélioration de la feuille de personnages #547
@ -239,7 +239,8 @@ export class RdDUtility {
|
|||||||
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
||||||
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
||||||
|
|
||||||
Handlebars.registerHelper('sortCompetence', competences => competences.sort((a, b) => {
|
Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.visible)
|
||||||
|
.sort((a, b) => {
|
||||||
if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) {
|
if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) {
|
||||||
if (a.name.includes("Cité")) return -1;
|
if (a.name.includes("Cité")) return -1;
|
||||||
if (b.name.includes("Cité")) return 1;
|
if (b.name.includes("Cité")) return 1;
|
||||||
@ -268,7 +269,8 @@ export class RdDUtility {
|
|||||||
return a.name.localeCompare(b.name);
|
return a.name.localeCompare(b.name);
|
||||||
}
|
}
|
||||||
return a.name.localeCompare(b.name);
|
return a.name.localeCompare(b.name);
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
{{#if competences}}
|
||||||
|
<div class="flex-shrink">
|
||||||
<header class="competence-header flexrow">
|
<header class="competence-header flexrow">
|
||||||
<span class="competence-title">{{categorie}}</span>
|
<span class="competence-title">{{categorie}}</span>
|
||||||
</header>
|
</header>
|
||||||
@ -25,3 +27,5 @@
|
|||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
Loading…
Reference in New Issue
Block a user