Removed hardcoded tierlimit on beastform

This commit is contained in:
WBHarry 2025-07-03 20:54:52 +02:00
parent 2fd5bc7eb0
commit 72dfc54705
8 changed files with 49 additions and 11 deletions

View file

@ -44,10 +44,9 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat
const context = await super._prepareContext(_options);
context.configData = this.configData;
const tierLimit = 2;
context.beastformTiers = game.items.reduce((acc, x) => {
const tier = tiers[x.system.tier];
if (x.type !== 'beastform' || tier.value > tierLimit) return acc;
if (x.type !== 'beastform' || tier.value > context.configData.beastform.tierLimit) return acc;
if (!acc[tier.value]) acc[tier.value] = { label: game.i18n.localize(tier.label), values: {} };
acc[tier.value].values[x.uuid] = { selected: this.selected == x.uuid, value: x };