mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
PR fixes
This commit is contained in:
parent
72dfc54705
commit
266a2806ab
13 changed files with 102 additions and 52 deletions
|
|
@ -12,7 +12,6 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat
|
|||
|
||||
static DEFAULT_OPTIONS = {
|
||||
tag: 'form',
|
||||
id: 'beastform-selection',
|
||||
classes: ['daggerheart', 'views', 'dh-style', 'beastform-selection'],
|
||||
position: {
|
||||
width: 600,
|
||||
|
|
@ -42,11 +41,10 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat
|
|||
|
||||
async _prepareContext(_options) {
|
||||
const context = await super._prepareContext(_options);
|
||||
context.configData = this.configData;
|
||||
|
||||
context.beastformTiers = game.items.reduce((acc, x) => {
|
||||
const tier = tiers[x.system.tier];
|
||||
if (x.type !== 'beastform' || tier.value > context.configData.beastform.tierLimit) return acc;
|
||||
if (x.type !== 'beastform' || tier.value > this.configData.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