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

@ -523,14 +523,7 @@ export default class DhCharacter extends BaseDataActor {
return { return {
...data, ...data,
tier: this.tier, tier: this.tier,
level: this.levelData.level.current, level: this.levelData.level.current
system: {
token: this.resources.tokens,
dice: this.resources.dice,
bonuses: this.bonuses,
rules: this.rules,
levelData: this.levelData
}
}; };
} }

View file

@ -16,7 +16,21 @@ export default class DHToken extends TokenDocument {
}); });
bars.sort((a, b) => a.label.compare(b.label)); 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 values = attributes.value.reduce((acc, v) => {
const a = v.join('.'); const a = v.join('.');
if (invalidAttributes.some(x => a.startsWith(x))) return acc; if (invalidAttributes.some(x => a.startsWith(x))) return acc;