mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
Removed hardcoded tierlimit on beastform
This commit is contained in:
parent
2fd5bc7eb0
commit
72dfc54705
8 changed files with 49 additions and 11 deletions
|
|
@ -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 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue