Fix sur armes et affichage
This commit is contained in:
parent
f00825ea91
commit
2f3a8e91bd
@ -142,7 +142,9 @@ export class HeritiersActor extends Actor {
|
||||
return this.items.filter(item => item.type == "profil")
|
||||
}
|
||||
getPouvoirs() {
|
||||
return this.items.filter(item => item.type == "pouvoir")
|
||||
let pouvoirs = this.items.filter(item => item.type == "pouvoir")
|
||||
HeritiersUtility.sortArrayObjectsByName(pouvoirs)
|
||||
return pouvoirs
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getSkills() {
|
||||
@ -182,6 +184,7 @@ export class HeritiersActor extends Actor {
|
||||
}
|
||||
}
|
||||
}
|
||||
HeritiersUtility.sortArrayObjectsByName(comp)
|
||||
return comp
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
@ -207,6 +210,7 @@ export class HeritiersActor extends Actor {
|
||||
}
|
||||
}
|
||||
}
|
||||
HeritiersUtility.sortArrayObjectsByName(comp)
|
||||
return HeritiersUtility.sortByName(comp)
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,21 @@ export class HeritiersUtility {
|
||||
})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static sortArrayObjectsByName(myArray) {
|
||||
myArray.sort((a, b) => {
|
||||
let fa = a.name.toLowerCase();
|
||||
let fb = b.name.toLowerCase();
|
||||
if (fa < fb) {
|
||||
return -1;
|
||||
}
|
||||
if (fa > fb) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getSkills() {
|
||||
return this.skills
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "fvtt-les-heritiers",
|
||||
"description": "Les Héritiers pour FoundryVTT",
|
||||
"version": "10.0.19",
|
||||
"version": "10.0.20",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Uberwald/LeRatierBretonnien",
|
||||
@ -19,7 +19,7 @@
|
||||
"gridUnits": "m",
|
||||
"license": "LICENSE.txt",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/raw/branch/master/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.19.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.20.zip",
|
||||
"languages": [
|
||||
{
|
||||
"lang": "fr",
|
||||
|
@ -107,6 +107,7 @@
|
||||
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
Loading…
Reference in New Issue
Block a user