Fix #142 - Perks alpha sorted
This commit is contained in:
parent
50f4339454
commit
43d4acaea4
@ -371,12 +371,13 @@ export class PegasusActorCreate {
|
||||
async showRoleStartSpec() {
|
||||
if (!this.roleSpecStart) {
|
||||
this.roleSpecStart = this.specs.filter(spec => spec.system.statistic.toUpperCase() == this.currentRole.system.statincrease1.toUpperCase() || spec.system.statistic.toUpperCase() == this.currentRole.system.statincrease2.toUpperCase())
|
||||
console.log("SPEC FOUND", this.roleSpecStart)
|
||||
//console.log("SPEC FOUND", this.roleSpecStart)
|
||||
//this.roleSpecStart = duplicate(this.currentRole.data.specialisationsplus1)
|
||||
this.nbRoleSpecStart = 2;
|
||||
}
|
||||
let formData = this.createFormData("select-role-start-spec")
|
||||
formData.rolestartspec = this.roleSpecStart
|
||||
formData.rolestartspec.sort(function compare(a, b) { if (a.name < b.name) { return -1 } else { return 1 } })
|
||||
formData.nbrolespecstart = this.nbRoleSpecStart;
|
||||
this.renderChatMessage(formData)
|
||||
}
|
||||
@ -398,6 +399,7 @@ export class PegasusActorCreate {
|
||||
async showRoleSpecialisations() {
|
||||
let formData = this.createFormData("select-role-spec")
|
||||
formData.rolespec = duplicate(this.roleSpec)
|
||||
formData.rolespec.sort(function compare(a, b) { if (a.name < b.name) { return -1 } else { return 1 } })
|
||||
formData.dt = 1
|
||||
if (this.nbDT2 > 0) {
|
||||
formData.dt = 2
|
||||
@ -410,6 +412,7 @@ export class PegasusActorCreate {
|
||||
async showRolePerks() {
|
||||
let formData = this.createFormData("select-role-perk")
|
||||
formData.roleperks = duplicate(this.rolePerks)
|
||||
formData.roleperks.sort(function compare(a, b) { if (a.name < b.name) { return -1 } else { return 1 } })
|
||||
formData.nbperks = this.nbPerks
|
||||
this.renderChatMessage(formData)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user