Roll V2: les jeux

This commit is contained in:
2025-10-06 01:24:16 +02:00
parent 1bf9e330f4
commit 293af5ab83
15 changed files with 100 additions and 74 deletions

View File

@@ -32,7 +32,7 @@ export class RollPartComp extends RollPartSelect {
$getActorComps(rollData) {
const competences = (rollData.active.actor?.getCompetences() ?? [])
.map(RollPartComp.$extractComp)
.map(RollPartComp.extractComp)
.sort(Misc.ascending(it => Grammar.toLowerCaseNoAccentNoSpace(it.label)))
/* TODO: filter competences */
const listCompetences = [
@@ -42,7 +42,7 @@ export class RollPartComp extends RollPartSelect {
return listCompetences
}
static $extractComp(comp) {
static extractComp(comp) {
return {
key: comp.name,
label: comp.name,
@@ -69,7 +69,7 @@ export class RollPartComp extends RollPartSelect {
}
setSpecialComp(rollData, comps) {
this.getRefs(rollData).comps = comps.map(RollPartComp.$extractComp)
this.getRefs(rollData).comps = comps.map(RollPartComp.extractComp)
.sort(Misc.ascending(it => Grammar.toLowerCaseNoAccentNoSpace(it.label)))
}