Improved tooltips wiht more data (#701)

This commit is contained in:
WBHarry 2025-08-07 19:23:34 +02:00 committed by GitHub
parent df99d0e4c6
commit 5045801475
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 73 additions and 12 deletions

View file

@ -4,7 +4,25 @@ export default class BeastformField extends fields.SchemaField {
constructor(options = {}, context = {}) {
const beastformFields = {
tierAccess: new fields.SchemaField({
exact: new fields.NumberField({ integer: true, nullable: true, initial: null })
exact: new fields.NumberField({
integer: true,
nullable: true,
initial: null,
choices: () => {
const settingsTiers = game.settings.get(
CONFIG.DH.id,
CONFIG.DH.SETTINGS.gameSettings.LevelTiers
).tiers;
return Object.values(settingsTiers).reduce(
(acc, tier) => {
acc[tier.tier] = game.i18n.localize(tier.name);
return acc;
},
{ 1: game.i18n.localize('DAGGERHEART.GENERAL.Tiers.1') }
);
},
hint: 'DAGGERHEART.ACTIONS.Config.beastform.exactHint'
})
})
};
super(beastformFields, options, context);