Revert "Made it work. But I hate it."

This reverts commit d2fc9fd648.
This commit is contained in:
WBHarry 2026-02-06 09:59:28 +01:00
parent d2fc9fd648
commit 739a7a3c3f
2 changed files with 11 additions and 67 deletions

View file

@ -8,10 +8,13 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
this.changeChoices = Object.keys(game.system.api.models.actors).reduce((acc, key) => {
if (!ignoredActorKeys.includes(key)) {
const model = game.system.api.models.actors[key];
const attributes = CONFIG.Token.documentClass.getTrackedAttributes(model, [], true);
const attributes = CONFIG.Token.documentClass.getTrackedAttributes(model);
// As per DHToken._getTrackedAttributesFromSchema, attributes.bar have a max version as well.
const maxAttributes = attributes.bar.map(x => [...x, 'max']);
attributes.value.push(...maxAttributes);
const group = game.i18n.localize(model.metadata.label);
const choices = CONFIG.Token.documentClass
.getTrackedAttributeChoices(attributes, model, true)
.getTrackedAttributeChoices(attributes, model)
.map(x => ({ ...x, group: group }));
acc.push(...choices);
}