Changed generalConfig.tiers to be number based

This commit is contained in:
WBHarry 2025-07-19 03:10:16 +02:00
parent 51ba94c83a
commit 721eb347db
7 changed files with 20 additions and 41 deletions

View file

@ -103,7 +103,7 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat
const compendiumBeastforms = await game.packs.get(`daggerheart.beastforms`)?.getDocuments();
context.beastformTiers = [...(compendiumBeastforms ? compendiumBeastforms : []), ...game.items].reduce(
(acc, x) => {
const tier = CONFIG.DH.GENERAL.tiersAlternate[x.system.tier];
const tier = CONFIG.DH.GENERAL.tiers[x.system.tier];
if (x.type !== 'beastform' || tier.id > this.configData.tierLimit) return acc;
if (!acc[tier.id]) acc[tier.id] = { label: game.i18n.localize(tier.label), values: {} };

View file

@ -114,7 +114,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
const settingsTiers = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LevelTiers).tiers;
context.tierOptions = [
{ key: 1, label: game.i18n.localize('DAGGERHEART.GENERAL.Tiers.tier1') },
{ key: 1, label: game.i18n.localize('DAGGERHEART.GENERAL.Tiers.1') },
...Object.values(settingsTiers).map(x => ({ key: x.tier, label: x.name }))
];