Tri alpha + ajout contacts
This commit is contained in:
@@ -108,43 +108,46 @@ export class HeritiersActor extends Actor {
|
||||
}
|
||||
|
||||
/* ----------------------- --------------------- */
|
||||
getItemSorted( types) {
|
||||
let items = this.items.filter(item => types.includes(item.type )) || []
|
||||
HeritiersUtility.sortArrayObjectsByName(items)
|
||||
return items
|
||||
}
|
||||
getEquipments() {
|
||||
return this.items.filter(item => item.type == "equipement" || item.type == "accessoire")
|
||||
return this.getItemSorted( ["equipement", "accessoire"] )
|
||||
}
|
||||
getAvantages() {
|
||||
return this.items.filter(item => item.type == "avantage")
|
||||
return this.getItemSorted( ["avantage"])
|
||||
}
|
||||
getDesavantages() {
|
||||
return this.items.filter(item => item.type == "desavantage")
|
||||
return this.getItemSorted( ["desavantage"])
|
||||
}
|
||||
getMonnaies() {
|
||||
return this.items.filter(item => item.type == "monnaie")
|
||||
return this.getItemSorted( ["monnaie"])
|
||||
}
|
||||
getArmors() {
|
||||
return this.items.filter(item => item.type == "protection")
|
||||
return this.getItemSorted( ["protection"])
|
||||
}
|
||||
getTalents() {
|
||||
return this.items.filter(item => item.type == "talent")
|
||||
return this.getItemSorted( ["talent"])
|
||||
}
|
||||
getContacts() {
|
||||
return this.items.filter(item => item.type == "contact")
|
||||
return this.getItemSorted( ["contact"])
|
||||
}
|
||||
getAtouts() {
|
||||
return this.items.filter(item => item.type == "atoutfeerique")
|
||||
return this.getItemSorted( ["atoutfeerique"])
|
||||
}
|
||||
getCapacites() {
|
||||
return this.items.filter(item => item.type == "capacitenaturelle")
|
||||
return this.getItemSorted( ["capacitenaturelle"])
|
||||
}
|
||||
getFee() {
|
||||
return this.items.find(item => item.type == "fee")
|
||||
return this.items.filter(item => item.type =="fee")
|
||||
}
|
||||
getProfils() {
|
||||
return this.items.filter(item => item.type == "profil")
|
||||
return this.getItemSorted( ["profil"])
|
||||
}
|
||||
getPouvoirs() {
|
||||
let pouvoirs = this.items.filter(item => item.type == "pouvoir") || []
|
||||
HeritiersUtility.sortArrayObjectsByName(pouvoirs)
|
||||
return pouvoirs
|
||||
return this.getItemSorted( ["pouvoir"])
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getSkills() {
|
||||
@@ -199,6 +202,9 @@ export class HeritiersActor extends Actor {
|
||||
contactList[item.system.contacttype] = c
|
||||
}
|
||||
}
|
||||
for (let key in contactList) {
|
||||
HeritiersUtility.sortArrayObjectsByName(contactList[key].list)
|
||||
}
|
||||
return contactList
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user