diff --git a/module/actor-sheet.js b/module/actor-sheet.js
index 441e0222..0eb85585 100644
--- a/module/actor-sheet.js
+++ b/module/actor-sheet.js
@@ -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) => {
diff --git a/module/rdd-utility.js b/module/rdd-utility.js
index 7e575f86..3817ec8d 100644
--- a/module/rdd-utility.js
+++ b/module/rdd-utility.js
@@ -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);
}
diff --git a/styles/simple.css b/styles/simple.css
index f220adac..6935a4a1 100644
--- a/styles/simple.css
+++ b/styles/simple.css
@@ -429,6 +429,13 @@ table {border: 1px solid #7a7971;}
text-align: right;
}
+.competence-list .item-controls {
+ display: contents !important;
+}
+.competence-list .item-controls.hidden-controls {
+ display: none !important;
+}
+
.rdddialog .dialog-roll-sort s{
width: 600px;
height: 430px;
@@ -612,8 +619,27 @@ section.sheet-body:after {
}
.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-xp {
+ flex-grow: 0;
margin: 0.05rem;
- flex-basis: 3rem;
+ flex-basis: 2rem;
+ text-align: center;
+}
+.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-value {
+ flex-grow: 0;
+ margin: 0.05rem;
+ flex-basis: 2rem;
+ text-align: center;
+}
+.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-archetype {
+ flex-grow: 0;
+ margin: 0.05rem;
+ flex-basis: 2rem;
+ text-align: center;
+}
+.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-xp-sort {
+ flex-grow: 0;
+ margin: 0.05rem;
+ flex-basis: 2rem;
text-align: center;
}
@@ -658,7 +684,7 @@ ul, li {
border-radius: 0.25rem;
padding: 0.125rem;
flex: 1 1 5rem;
- background: rgba(195, 152, 22, 0.5);
+ background: rgba(195, 152, 22, 0.5) !important;
}
.blessures-list ul {
@@ -684,6 +710,8 @@ ul, li {
border-radius: 0.25rem;
padding: 0.125rem;
flex: 1 1 5rem;
+ display: flex !important;
+ align-items: baseline !important;
}
.table-row {
@@ -734,6 +762,7 @@ ul, li {
height: 24px;
flex-grow: 0;
margin-right: 0.25rem;
+ vertical-align: bottom;
}
.competence-column {
flex-direction: column;
diff --git a/templates/actor-sheet-categorie-competences-partial.html b/templates/actor-sheet-categorie-competences-partial.html
index a3fa8da9..8a20a5e5 100644
--- a/templates/actor-sheet-categorie-competences-partial.html
+++ b/templates/actor-sheet-categorie-competences-partial.html
@@ -1,7 +1,7 @@