forked from public/foundryvtt-reve-de-dragon
Merge branch 'character-sheet-style' into 'v1.4'
Character sheet style - Align and sort skills See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!247
This commit is contained in:
@@ -30,7 +30,8 @@ export class RdDActorSheet extends ActorSheet {
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||
editCaracComp: false,
|
||||
showCompNiveauBase: false,
|
||||
montrerArchetype: false
|
||||
montrerArchetype: false,
|
||||
hideControls: true
|
||||
});
|
||||
}
|
||||
|
||||
@@ -483,6 +484,10 @@ export class RdDActorSheet extends ActorSheet {
|
||||
this.options.montrerArchetype = !this.options.montrerArchetype;
|
||||
this.render(true);
|
||||
});
|
||||
html.find('.lock-unlock-controls').click((event) => {console.log("CONTROLS",this.options.hideControls)
|
||||
this.options.hideControls = !this.options.hideControls;
|
||||
this.render(true);
|
||||
});
|
||||
|
||||
// On pts de reve change
|
||||
html.find('.pointsreve-value').change((event) => {
|
||||
|
@@ -220,6 +220,36 @@ export class RdDUtility {
|
||||
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
||||
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
||||
Handlebars.registerHelper('equals', (a, b) => a == b);
|
||||
Handlebars.registerHelper('sortCompetence', competences => competences.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;
|
||||
if (a.name.includes("Extérieur")) return -1;
|
||||
if (b.name.includes("Extérieur")) return 1;
|
||||
return a.name.localeCompare(b.name);
|
||||
}
|
||||
if (a.data.categorie.startsWith("melee") && b.data.categorie.startsWith("melee")) {
|
||||
if (a.name.includes("Corps")) return -1;
|
||||
if (b.name.includes("Corps")) return 1;
|
||||
if (a.name.includes("Dague")) return -1;
|
||||
if (b.name.includes("Dague")) return 1;
|
||||
if (a.name.includes("Esquive")) return -1;
|
||||
if (b.name.includes("Esquive")) return 1;
|
||||
return a.name.localeCompare(b.name);
|
||||
}
|
||||
if (a.name.startsWith("Voie") && b.name.startsWith("Voie")) {
|
||||
if (a.name.includes("Oniros")) return -1;
|
||||
if (b.name.includes("Oniros")) return 1;
|
||||
if (a.name.includes("Hypnos")) return -1;
|
||||
if (b.name.includes("Hypnos")) return 1;
|
||||
if (a.name.includes("Narcos")) return -1;
|
||||
if (b.name.includes("Narcos")) return 1;
|
||||
if (a.name.includes("Thanatos")) return -1;
|
||||
if (b.name.includes("Thanatos")) return 1;
|
||||
return a.name.localeCompare(b.name);
|
||||
}
|
||||
return a.name.localeCompare(b.name);
|
||||
}));
|
||||
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
Reference in New Issue
Block a user