diff --git a/module/applications/sheets-configs/setting-feature-config.mjs b/module/applications/sheets-configs/setting-feature-config.mjs index 28e686ea..89421b65 100644 --- a/module/applications/sheets-configs/setting-feature-config.mjs +++ b/module/applications/sheets-configs/setting-feature-config.mjs @@ -188,8 +188,9 @@ export default class SettingFeatureConfig extends HandlebarsApplicationMixin(App if (type === 'effect') { const move = foundry.utils.getProperty(this.settings, this.movePath); for (const action of move.actions) { - const remainingEffects = action.effects.filter(x => x._id !== id); - if (action.effects.length !== remainingEffects.length) { + const actionEffects = action.effects ?? []; + const remainingEffects = actionEffects.filter(x => x._id !== id); + if (actionEffects.length !== remainingEffects.length) { await action.update({ effects: remainingEffects.map(x => { const { _id, ...rest } = x; diff --git a/module/config/itemBrowserConfig.mjs b/module/config/itemBrowserConfig.mjs index f20e56d0..638c1504 100644 --- a/module/config/itemBrowserConfig.mjs +++ b/module/config/itemBrowserConfig.mjs @@ -172,8 +172,8 @@ export const typeConfig = { key: 'system.secondary', label: 'DAGGERHEART.UI.ItemBrowser.subtype', choices: [ - { value: false, label: 'DAGGERHEART.ITEMS.Weapon.primaryWeapon' }, - { value: true, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon' } + { value: false, label: 'DAGGERHEART.ITEMS.Weapon.primaryWeapon.short' }, + { value: true, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon.short' } ] }, { diff --git a/module/config/itemConfig.mjs b/module/config/itemConfig.mjs index 77328987..11330aee 100644 --- a/module/config/itemConfig.mjs +++ b/module/config/itemConfig.mjs @@ -453,7 +453,7 @@ export const allArmorFeatures = () => { const feature = homebrewFeatures[key]; const actions = feature.actions.map(action => ({ ...action, - effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)), + effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id))??[], type: action.type })); const actionEffects = actions.flatMap(a => a.effects); @@ -1389,7 +1389,7 @@ export const allWeaponFeatures = () => { const actions = feature.actions.map(action => ({ ...action, - effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)), + effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id))??[], type: action.type })); const actionEffects = actions.flatMap(a => a.effects); diff --git a/module/data/item/weapon.mjs b/module/data/item/weapon.mjs index bb7fde0a..04d1db7a 100644 --- a/module/data/item/weapon.mjs +++ b/module/data/item/weapon.mjs @@ -28,7 +28,7 @@ export default class DHWeapon extends AttachableItem { equipped: new fields.BooleanField({ initial: false }), //SETTINGS - secondary: new fields.BooleanField({ initial: false, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon' }), + secondary: new fields.BooleanField({ initial: false, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon.full' }), burden: new fields.StringField({ required: true, choices: CONFIG.DH.GENERAL.burden, diff --git a/templates/sheets/items/weapon/settings.hbs b/templates/sheets/items/weapon/settings.hbs index f9499221..7ff8becf 100644 --- a/templates/sheets/items/weapon/settings.hbs +++ b/templates/sheets/items/weapon/settings.hbs @@ -7,7 +7,7 @@ {{localize tabs.settings.label}} {{localize "DAGGERHEART.GENERAL.Tiers.singular"}} {{formInput systemFields.tier value=source.system.tier}} - {{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon"}} + {{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon.full"}} {{formInput systemFields.secondary value=source.system.secondary}} {{localize "DAGGERHEART.GENERAL.Trait.single"}} {{formInput systemFields.attack.fields.roll.fields.trait value=document.system.attack.roll.trait name="system.attack.roll.trait" label="DAGGERHEART.GENERAL.Trait.single" localize=true}} diff --git a/templates/ui/combatTracker/combatTrackerHeader.hbs b/templates/ui/combatTracker/combatTrackerHeader.hbs index 8ac960c6..803286ab 100644 --- a/templates/ui/combatTracker/combatTrackerHeader.hbs +++ b/templates/ui/combatTracker/combatTrackerHeader.hbs @@ -66,7 +66,7 @@ {{#if (and combats.length user.isGM)}}
- {{battlepoints.current}}/{{battlepoints.max}} BP{{#if battlepoints.hasModifierBP}}*{{/if}} + {{battlepoints.current}}/{{battlepoints.max}} {{localize "DAGGERHEART.GENERAL.Battlepoints.short"}}{{#if battlepoints.hasModifierBP}}*{{/if}}
{{/if}}