Empoignade V2

This commit is contained in:
2025-10-21 02:26:44 +02:00
parent c47fc4f5b6
commit 2cbee42180
28 changed files with 383 additions and 114 deletions

View File

@@ -18,12 +18,16 @@ export class RollPartComp extends RollPartSelect {
loadRefs(rollData) {
const refs = this.getRefs(rollData)
const selected = this.getSelected(rollData)
refs.all = this.$getActorComps(rollData)
.filter(comp => !selected.forced ||
(selected.key ?
Grammar.includesLowerCaseNoAccent(comp.name, selected.key)
: comp.key == '')
)
const all = this.$getActorComps(rollData)
if (selected.forced) {
refs.all = all.filter(comp => Grammar.equalsInsensitive(comp.label, selected.key))
if (refs.all.length == 0) {
refs.all = all.filter(comp => Grammar.includesLowerCaseNoAccent(comp.label, selected.key))
}
}
else {
refs.all = all
}
refs.comps = refs.all
this.$selectComp(rollData)
}