Amélioration de la feuille de personnages #547

Merged
uberwald merged 7 commits from VincentVk/foundryvtt-reve-de-dragon:v1.5 into v1.5 2022-08-28 08:40:51 +02:00
2 changed files with 61 additions and 55 deletions
Showing only changes of commit e4da124579 - Show all commits

View File

@ -239,7 +239,8 @@ export class RdDUtility {
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
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.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 loadTemplates(templatePaths);
}

View File

@ -1,3 +1,5 @@
{{#if competences}}
<div class="flex-shrink">
<header class="competence-header flexrow">
<span class="competence-title">{{categorie}}</span>
</header>
@ -25,3 +27,5 @@
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{/each}}
</ul>
</div>
{{/if}}