Skip to content

Commit

Permalink
Fix ability label for dnd5e 2.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkinabout committed Aug 9, 2023
1 parent 3069358 commit 140b69d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/action-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
const abilityId = ability[0]
const id = `${actionType}-${ability[0]}`
const abbreviatedName = abilityId.charAt(0).toUpperCase() + abilityId.slice(1)
const label = this.systemVersion.startsWith('2.2') ? game.dnd5e.config.abilities[abilityId].label : game.dnd5e.config.abilities[abilityId]
const label = this.systemVersion >= '2.2' ? game.dnd5e.config.abilities[abilityId].label : game.dnd5e.config.abilities[abilityId]
const name = this.abbreviateSkills ? abbreviatedName : label
// Localise
const actionTypeName = `${coreModule.api.Utils.i18n(ACTION_TYPE[actionType])}: ` ?? ''
Expand Down

0 comments on commit 140b69d

Please sign in to comment.