mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Merge branch 'feature/Active-Effect-Autocomplete' of https://github.com/Foundryborne/daggerheart into feature/Active-Effect-Autocomplete
This commit is contained in:
commit
1ecce746b0
4 changed files with 32 additions and 10 deletions
|
|
@ -73,6 +73,9 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
|
|||
|
||||
const element = document.createElement('li');
|
||||
element.innerHTML = `${beforeText}${matchText ? `<strong>${matchText}</strong>` : ''}${after}`;
|
||||
if (item.hint) {
|
||||
element.dataset.tooltip = game.i18n.localize(item.hint);
|
||||
}
|
||||
|
||||
return element;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -179,7 +179,8 @@ export default class DhCharacter extends BaseDataActor {
|
|||
required: true,
|
||||
integer: true,
|
||||
initial: 0,
|
||||
label: 'DAGGERHEART.GENERAL.Rules.damageReduction.maxArmorMarkedStress'
|
||||
label: 'DAGGERHEART.GENERAL.Rules.damageReduction.maxArmorMarkedStress.label',
|
||||
hint: 'DAGGERHEART.GENERAL.Rules.damageReduction.maxArmorMarkedStress.hint'
|
||||
})
|
||||
}),
|
||||
stressDamageReduction: new fields.SchemaField({
|
||||
|
|
@ -190,7 +191,8 @@ export default class DhCharacter extends BaseDataActor {
|
|||
increasePerArmorMark: new fields.NumberField({
|
||||
integer: true,
|
||||
initial: 1,
|
||||
label: 'DAGGERHEART.GENERAL.Rules.damageReduction.increasePerArmorMark'
|
||||
label: 'DAGGERHEART.GENERAL.Rules.damageReduction.increasePerArmorMark.label',
|
||||
hint: 'DAGGERHEART.GENERAL.Rules.damageReduction.increasePerArmorMark.hint'
|
||||
}),
|
||||
magical: new fields.BooleanField({ initial: false }),
|
||||
physical: new fields.BooleanField({ initial: false })
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@ export default class DHToken extends TokenDocument {
|
|||
const a = v.join('.');
|
||||
if (invalidAttributes.some(x => a.startsWith(x))) return acc;
|
||||
|
||||
const modelLabel = model ? game.i18n.localize(model.schema.getField(a).label) : null;
|
||||
acc.push({ group: valueGroup, value: a, label: modelLabel ? modelLabel : a });
|
||||
const field = model ? model.schema.getField(a) : null;
|
||||
const modelLabel = field ? game.i18n.localize(field.label) : null;
|
||||
const hint = field ? game.i18n.localize(field.hint) : null;
|
||||
acc.push({ group: valueGroup, value: a, label: modelLabel ? modelLabel : a, hint: hint });
|
||||
|
||||
return acc;
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue