character.getRollData cleanup

This commit is contained in:
WBHarry 2025-07-20 12:52:39 +02:00
parent 7ac15ebd94
commit a1801a78f0
2 changed files with 16 additions and 9 deletions

View file

@ -16,7 +16,21 @@ export default class DHToken extends TokenDocument {
});
bars.sort((a, b) => a.label.compare(b.label));
const invalidAttributes = ['gold', 'levelData', 'actions'];
const invalidAttributes = [
'gold',
'levelData',
'actions',
'biography',
'class',
'multiclass',
'companion',
'notes',
'partner',
'description',
'impulses',
'tier',
'type'
];
const values = attributes.value.reduce((acc, v) => {
const a = v.join('.');
if (invalidAttributes.some(x => a.startsWith(x))) return acc;