Display Heritages in the Features Tab#22249
Conversation
| level: null, | ||
| feat: actor.heritage, | ||
| children: this.#getNestedSlots(actor.heritage), | ||
| } as never); |
There was a problem hiding this comment.
avoid casting to never. There's gotta be another way.
There was a problem hiding this comment.
Thanks, fixed and will keep in mind for the future
| @@ -247,6 +247,9 @@ class CharacterFeats<TActor extends CharacterPF2e> extends Collection<string, Fe | |||
| if (granter?.isOfType("feat") && granter.grants.includes(feat) && isNested) { | |||
There was a problem hiding this comment.
What is the practicality of including the heritage in granter.grants? It looks like grants in FeatPF2e is FeatPF2e | HeritagePF2e, so doing granter?.isOfType("feat", "heritage") && granter.grants.includes(feat) && isNested should be more terse
There was a problem hiding this comment.
I tried that, but Heritage doesn't have .grants, so the check fails and granted items show in bonus feats as duplicates, unfortunately
iDantar
left a comment
There was a problem hiding this comment.
Thanks again for the review, finally got back to PC and addressed it - would you be able to take another look please?
| @@ -247,6 +247,9 @@ class CharacterFeats<TActor extends CharacterPF2e> extends Collection<string, Fe | |||
| if (granter?.isOfType("feat") && granter.grants.includes(feat) && isNested) { | |||
There was a problem hiding this comment.
I tried that, but Heritage doesn't have .grants, so the check fails and granted items show in bonus feats as duplicates, unfortunately
| level: null, | ||
| feat: actor.heritage, | ||
| children: this.#getNestedSlots(actor.heritage), | ||
| } as never); |
There was a problem hiding this comment.
Thanks, fixed and will keep in mind for the future
|
Something feels off about hijacking it at the sheet level rather than handling it in the feat groups data structure. Perhaps this is the right solution but it is impossible for me to know without digging deep, and I don't have the gumption for that right at this time. |
|
I share the feeling, thanks for the review. I'll try to see if it can be moved to feat groups |
Closes #22235
Supersedes #22233
Inserts the heritage in Ancestry Features list and renders it's nested feats, if any.

Some examples: